A sudden, rock-hard pain in the calf in the middle of the night, a foot cramp while swimming or a thigh cramp at the end of a long run - almost everyone knows muscle cramps. They usually pass after a moment, but they can be so painful that they wake you up, and when they happen often, they become worrying. The popular answer is: “you're low on magnesium”. Sometimes that's true, but there are many more causes. In this article we explain what muscle cramps are, what their most common causes are, what role hydration and electrolytes play, what to do during a cramp, when to see a doctor and which everyday habits are worth rethinking.
This article is for informational purposes only and does not replace medical advice. If you have symptoms, consult a doctor.
What is a muscle cramp?
A muscle cramp (colloquially a “charley horse”, in medical terms often described as a painful muscle cramp) is a sudden, involuntary and painful tightening of a muscle or part of it. The muscle hardens, sometimes a knot can be seen or felt under the skin, and moving the joint becomes impossible for a moment. A cramp usually lasts from a few seconds to a few minutes, and afterwards the muscle may stay tender for several hours or even until the next day.
It most often affects the calf, but it can also occur in the muscles of the foot, thigh (back and front), hand or abdomen.
Cramps vs. other muscle complaints
| Complaint | What it usually looks like |
|---|---|
| Painful cramp | Sudden, severe pain, hard muscle, lasts seconds or minutes, passes on its own or after stretching |
| Fasciculations (muscle twitching) | Small, visible twitches under the skin, usually painless, e.g. in the eyelid or calf |
| Post-exercise soreness (DOMS) | Tenderness and stiffness that appear a day or two after unusual exertion |
| Restless legs syndrome | An unpleasant sensation in the legs in the evening and at night, an urge to move the legs, less discomfort when moving - without the typical “hardening” of the muscle |
| Calf pain when walking that eases after stopping | May indicate a problem with arterial circulation (so-called intermittent claudication) - requires a medical assessment |
What causes muscle cramps?
In many people, cramps appear without one clear cause. These are called idiopathic cramps - especially night-time calf cramps, which more often affect older people. The most frequently mentioned contributing factors include:
Exertion and muscle fatigue
Exercise-associated cramps happen especially at the end of a long or intense workout, with a sudden increase in training load, in hot weather and when you are not sufficiently prepared for a given effort. Today, muscle fatigue and disrupted neuromuscular control are considered among the more important mechanisms, rather than just a “lack of minerals”.
Dehydration and electrolyte loss
A large loss of fluids and salts - with heavy sweating, in hot weather, with diarrhea or vomiting - may contribute to cramps. Electrolytes such as sodium, potassium, magnesium and calcium are involved in the conduction of nerve impulses and muscle function.
Prolonged sitting or standing
Many people associate little movement during the day, sitting for long periods with their legs tucked under, or standing in one position for many hours with evening and night-time cramps.
Pregnancy
Calf cramps are a common complaint during pregnancy, especially in the second half. Any new or worsening complaint is worth discussing with the doctor managing your pregnancy - also before reaching for any supplements.
Medications
Cramps can be a side effect of some medications, e.g. diuretics, some cholesterol medications, asthma medications and others. Do not stop taking medications on your own - if you suspect a link between cramps and a medication, talk to a doctor or pharmacist.
Medical conditions
Frequent cramps can be associated with conditions such as diabetes and neuropathy, thyroid disease, kidney disease, liver disease, electrolyte disorders, vascular disease (venous and arterial), diseases of the nerves and spinal cord, as well as spinal problems compressing nerve roots. This is why recurring cramps are worth reporting to a doctor.
Alcohol and other factors
Factors that may contribute to cramps also include alcohol abuse and, in some people, an uncomfortable position of the feet during sleep (e.g. feet strongly pointed under a heavy comforter).
Hydration and electrolytes - what is worth knowing?
The popular belief that a lack of magnesium is always to blame for cramps is an oversimplification. An electrolyte deficiency may be one of the causes, but not the only one, and supplementing “just in case” does not always make sense and is not suitable for everyone - e.g. with kidney disease, an excess of some minerals can be harmful.
- Drink regularly throughout the day, and more during exercise and in hot weather. Fluid needs are individual and depend on body weight, activity and temperature.
- During long, intense exercise with heavy sweating, many people reach for electrolyte drinks. It is worth choosing them sensibly for the type and duration of the effort.
- A varied diet - vegetables, fruit, legumes, nuts, whole grains and dairy are natural sources of potassium, magnesium and calcium.
- With diarrhea or vomiting, replacing fluids is important; if it lasts longer, or there is a high fever or signs of dehydration, contact a doctor.
- Supplements - before you reach for them, especially with chronic conditions, during pregnancy or when taking medications, talk to a doctor or pharmacist. A doctor may order blood tests to check your electrolyte levels.
What to do when a cramp hits?
During a cramp, most people instinctively do what is generally recommended:
- Stop the activity - stop if you are running; when swimming, safely swim to the shore or grab the edge of the pool.
- Gently stretch the muscle - with a calf cramp, pull your toes toward your knee (with your hand or a towel) or stand up and shift your weight onto your heel. Move calmly, without jerking.
- Massage the muscle with a gentle motion.
- Walk a few steps once the cramp has passed.
- Heat or cold - many people apply a warm compress to a tight muscle and a cold one to tenderness after a cramp.
If the cramp does not pass after 10-15 minutes, the muscle stays swollen and painful, or the symptoms described below appear, contact a doctor.
When should you see a doctor about muscle cramps?
Go to the ER immediately or call 112
- muscle cramps with confusion, impaired consciousness, headache, high body temperature after being in the heat (possible heat stroke),
- generalized muscle spasms, jaw stiffness, difficulty opening the mouth or swallowing,
- cramps with heart rhythm disturbances, palpitations, shortness of breath, fainting,
- sudden pain, swelling, redness and warmth of the calf, especially after a long journey, immobilization or surgery - this may be deep vein thrombosis; with shortness of breath or chest pain, call 112,
- very severe muscle pain after intense exercise with dark, brown urine.
Doctor's visit
- frequent, recurring cramps that regularly wake you from sleep,
- cramps with muscle weakness, muscle wasting, numbness or tingling,
- cramps that appeared after starting a new medication,
- cramps in a person with diabetes, kidney, liver or thyroid disease,
- calf pain when walking that eases after you stop,
- cramps with leg swelling, visible varicose veins or skin changes on the lower legs.
How are recurring cramps diagnosed?
The doctor starts with a conversation: when the cramps occur, in which muscles, how often, whether they are related to exercise, what medications you take, whether you have chronic conditions, what your diet and hydration look like. During the examination, they assess the muscles, sensation, reflexes, the pulse in the feet, and the presence of swelling and varicose veins.
Depending on the findings, the doctor may order:
- blood tests - including electrolytes (sodium, potassium, calcium, magnesium), glucose, kidney and liver parameters, thyroid hormones, and sometimes muscle enzymes,
- vascular ultrasound of the lower limbs - when venous or arterial problems are suspected,
- EMG and a neurological consultation - with nerve or muscle symptoms,
- a review of the medications you take.
Management depends on the cause. If the doctor does not find one, they usually discuss general rules on hydration, movement and stretching.
Which everyday habits are worth rethinking?
| Area | What to pay attention to |
|---|---|
| Fluids | Drinking regularly throughout the day, more during exercise and in hot weather |
| Diet | Varied, with vegetables, fruit, legumes, nuts and dairy |
| Training | Warm-up, gradually increasing loads, breaks for recovery |
| Movement during the day | Breaks from sitting, short walks, moving your feet and calves at your desk |
| Evening | Gentle calf stretching before bed as part of your evening routine |
| Sleep | A loose comforter over your feet, a comfortable position |
| Footwear | Comfortable, suited to the activity |
| Alcohol | Limit it |
You can do a gentle calf stretch, for example, standing facing a wall: rest your hands on it, step one leg back, press the heel to the floor and slowly shift your weight forward until you feel a stretch in the calf. Hold for 10-20 seconds, breathe calmly, switch legs. Do the exercise without pain, and if you have symptoms, consult a doctor or physical therapist first. We describe more gentle stretching exercises in our article on stretching the lower back.
If leg cramps come with back pain radiating to the leg, numbness or weakness, also read our article on sciatica and consult a doctor.
Frequently asked questions
Why do I get calf cramps at night?
Night-time calf cramps often appear without one clear cause, especially in older people. They may be favored by muscle fatigue, little movement, dehydration, pregnancy, some medications and medical conditions, among others. If they are frequent, it is worth discussing them with a doctor.
Are muscle cramps always caused by a lack of magnesium?
No. A deficiency of magnesium or other electrolytes may be one of the causes, but cramps have many other sources. Before reaching for supplements, especially with chronic conditions, talk to a doctor or pharmacist.
What should I do when I get a cramp?
Stop the activity, gently stretch the muscle, e.g. by pulling your toes toward your knee, massage it and walk a few steps. If the cramp does not pass or the muscle stays swollen, contact a doctor.
When are muscle cramps a cause for concern?
When they are frequent, or come with weakness, numbness, muscle wasting, swelling and redness of the calf, heart rhythm disturbances, confusion or dark urine. In such situations a medical assessment is needed, and some of them require urgent help.
What tests should be done for frequent cramps?
The scope of tests is determined by a doctor. These are often blood tests, including electrolytes, glucose, kidney, liver and thyroid parameters, and depending on the symptoms, also a vascular ultrasound or EMG.
Can medications cause muscle cramps?
Yes, cramps can be a side effect of some medications, e.g. diuretics. Do not stop taking medications on your own - talk to a doctor or pharmacist.
Are calf cramps during pregnancy normal?
They happen often, especially in the second half of pregnancy. Any new complaint and any supplement are worth discussing with the doctor managing your pregnancy.
How should I drink to avoid cramps during training?
Drink regularly before, during and after exercise, more in hot weather. During long, intense exercise, many people also replenish electrolytes. A warm-up and gradually increasing loads are also important.
Teeter equipment for movement and self-massage
The products below are not a way to treat cramps. They are equipment for everyday movement and self-massage accessories.
- Teeter FreeStep LT1 - a recumbent cross trainer (seated stepper) for training arms and legs in a seated position.
- Teeter FreeStep LT3 - the same mechanism as the LT1, with a ComfortSelect seat, SoftStep pedals and SureGrip handles.
- Massage ball and self-massage stick - Teeter accessories for self-massage at home.