Muscle Cramps
Table of Contents
- What a Cramp Actually Feels Like
- Nocturnal Leg Cramps
- Exercise-Associated Muscle Cramping
- Dehydration and Electrolytes: The Mixed Evidence
- Medications That Cause Cramps
- Medical Conditions Behind Persistent Cramps
- Neurological Conditions That Mimic Cramp
- Red Flags: When to Get Help Urgently
- How Cramps Are Evaluated
- What Actually Helps
- What to Expect Over Time
- Connections
- References & Research
- Featured Videos
What a Cramp Actually Feels Like
A muscle cramp is a sudden, involuntary, painful contraction you cannot voluntarily release. The muscle goes rock-hard, often visibly knotted, and the pain is out of all proportion to anything you just did. Most last seconds to a couple of minutes. What surprises people is the aftermath: the muscle can feel bruised and stiff for a day or two, because the contraction was strong enough to do minor mechanical damage.
The calf is the classic site, then the small muscles of the foot, then the hamstrings; cramps also hit the thigh, hand, abdominal wall and neck. They are extremely common and almost always benign: roughly 35–60% of adults report night cramps, the rate climbs steeply with age, and 30–50% of pregnant women get leg cramps, mostly in the third trimester.
A true cramp is a problem of motor nerve hyperexcitability, not of the muscle itself. EMG during a cramp shows motor units firing at up to 150 impulses per second, far above the 20–40 of a strong voluntary contraction, and the origin appears to lie in the terminal branches of the motor nerve inside the muscle. That explains most of this page: why stretching works (it recruits Golgi tendon organ feedback that inhibits the firing), why the muscle aches afterwards, and why the story about electrolytes being "used up" in the muscle is weaker than the folklore.
Nocturnal Leg Cramps
These are the most common form by far, and the pattern is distinctive: you wake in the first third of the night with a violent calf or foot cramp, hop out of bed and put weight on the leg or haul your toes towards you, it eases in one to three minutes, and the muscle aches for the rest of the night. Clusters are typical: several bad nights, then weeks of nothing.
Two structural facts explain them. Lying in bed lets the ankle fall into plantar flexion (toes pointed), putting the calf in its shortest position, and a shortened muscle cramps more easily. Sedentary adults also spend far less time in full ankle range than the anatomy was built for, so calf and Achilles sit habitually short. Hence the most effective non-drug treatment is the most boring one: lengthen the calf regularly and sleep with the ankle less pointed. In a randomised trial by Hallegraeff and colleagues in adults over 55, six weeks of nightly calf and hamstring stretching cut cramp frequency and intensity by roughly 60%; an earlier trial by Coppin and colleagues found a more modest effect, a fair reminder this helps many people rather than everyone.
Risk rises with age over 50 — motor units are progressively lost and survivors reinnervate more fibres, which appears to make them more excitable — and with long standing or sitting, unaccustomed exercise, pregnancy, dialysis, and several prescriptions covered below. Two reassurances: night cramps are not a warning sign of blood clots, and they are not restless legs syndrome, which is an urge to move with crawling discomfort, relieved by movement, without a hard contracted muscle.
Exercise-Associated Muscle Cramping
Exercise-associated muscle cramping is cramping during or just after activity. It is better studied than any other kind, because one Ironman provides thousands of subjects in an afternoon — and the findings overturned the received wisdom. When Schwellnus and colleagues followed 210 Ironman triathletes prospectively, those who cramped were not more dehydrated and did not have lower blood sodium than those who did not. What predicted cramping was running faster than training pace and, above all, a history of previous cramping. An earlier study by Sulzer, Schwellnus and Noakes in the same population found cramping triathletes had slightly higher serum sodium — the opposite of the depletion prediction.
The model that fits is altered neuromuscular control from muscle fatigue: excitatory muscle-spindle feedback rises while inhibitory Golgi tendon organ feedback falls, the motor neuron pool becomes hyperexcitable, and a muscle working in a shortened position tips into sustained firing. It also fits the reliable observations that cramps hit the hardest-working muscle group late in an event, worst when someone races beyond trained intensity, and stop when the muscle is passively stretched.
So train for the pace you intend to race, and back off at the first twinge: fine prodromal twitching often precedes a full cramp by a minute or two, and slowing frequently aborts it. Stretch the affected muscle immediately and hold it. Hydrate sensibly for heat safety, but do not expect fluid and salt to prevent cramps — and do not over-drink, because forcing plain water through a long event causes exercise-associated hyponatraemia, which is dangerous and presents with nausea, headache and confusion, not cramp.
Dehydration and Electrolytes: The Mixed Evidence
Frank, measurable derangements absolutely cause cramps and spasm — but these are lab abnormalities, not marginal dietary shortfalls:
- Low calcium — carpopedal spasm, tingling around the mouth and fingers, and in severe cases laryngospasm; seen after thyroid surgery, in vitamin D deficiency and in kidney failure. See Calcium.
- Low magnesium — tremor, twitching, tetany and cramps; it also blunts the parathyroid response, so calcium falls too. Causes: chronic proton pump inhibitors, alcohol, diuretics, malabsorption. See Magnesium.
- Low potassium — weakness and cramps; at severe levels rhabdomyolysis and arrhythmia. See Potassium.
- Rapidly shifting sodium — especially the osmotic shifts of haemodialysis, which is why dialysis cramps are so characteristic.
What does not survive the trials is the claim that ordinary cramps in healthy people come from mild dehydration or a mild dietary shortfall, and can be prevented by drinking more or taking a supplement. Magnesium is the clearest test: the Cochrane review by Garrison and colleagues pooled the randomised trials and found that in older adults with idiopathic cramps magnesium was no better than placebo — the pooled difference under one cramp per week, the confidence interval crossing zero. In pregnancy the evidence was inconsistent: small positive trials, all at risk of bias. Magnesium stays a reasonable trial in pregnancy and is indicated when magnesium is low; it is just not the general cure it is sold as. Salt and hydration fare similarly — field studies repeatedly fail to find the predicted difference between crampers and non-crampers, though laboratory dehydration does make cramps easier to induce electrically.
Medications That Cause Cramps
Drug-induced cramps are among the most commonly missed causes, because they often begin weeks or months after the prescription starts. Garrison and colleagues used sequence symmetry analysis on prescribing records — which drugs are dispensed just before someone is first given quinine for cramps — and several classes stood out.
Diuretics are the best-established offenders. Thiazides (hydrochlorothiazide, chlorthalidone, indapamide) and loop diuretics (furosemide, bumetanide, torsemide) act through volume and sodium depletion and through urinary loss of potassium and magnesium. Cramps that began within months of a new blood-pressure or fluid pill deserve potassium, magnesium and sodium checks and a conversation about dose; potassium-sparing agents such as spironolactone are much less often responsible.
Statin muscle symptoms are real but heavily over-attributed. Aching, cramping and proximal weakness are reported by perhaps 7–29% of patients in observational cohorts, but blinded randomised and re-challenge studies find most of those symptoms occur just as often on placebo — the drug-attributable excess is a few percent. Someone who abandons a statin they needed over cramps it did not cause has been harmed twice. The right approach is a supervised interruption and re-challenge, a creatine kinase check, a different statin or alternate-day dosing, and screening for what unmasks statin myopathy: untreated hypothyroidism, vitamin D deficiency, interacting drugs. See Cholesterol.
Others commonly implicated: beta-agonist inhalers and theophylline; raloxifene and teriparatide; aromatase inhibitors; proton pump inhibitors, via magnesium depletion; nifedipine; fibrates; neurotoxic chemotherapy such as cisplatin; alcohol; and withdrawal states. Bring every bottle to the appointment — but do not stop a cardiovascular medication on your own; ask for a planned trial off it, so the answer is interpretable.
Medical Conditions Behind Persistent Cramps
Kidney disease and dialysis. Cramps affect a large majority of people on maintenance haemodialysis, typically late in a session or in the hours after, driven by rapid fluid removal, falling plasma osmolality and low dialysate sodium. Fixes include slowing the ultrafiltration rate, reducing interdialytic weight gain, adjusting dialysate sodium, and midodrine when cramps come with intradialytic hypotension. Chronic kidney disease also cramps without dialysis, through uraemia, secondary hyperparathyroidism and low calcium. See Kidney Disease.
Thyroid and liver disease. Hypothyroidism causes a well-described myopathy — cramps, stiffness, slow-relaxing reflexes, proximal weakness, raised creatine kinase — and is one of the few causes that fully resolves with treatment, which is why TSH belongs in the first round of tests. See Hypothyroidism. Cramps affect roughly 60–90% of people with cirrhosis and are badly under-treated, driven by reduced plasma volume, diuretics for ascites, low albumin and low magnesium. See Cirrhosis.
Peripheral arterial disease is the most important mimic to separate out, because treatment differs completely and the condition predicts heart attack and stroke. Claudication is a cramping pain in the calf, thigh or buttock that appears after a reproducible walking distance and settles within minutes of standing still, without a hard contracted muscle and without night-time onset. The exam finds reduced foot pulses; the test is an ankle-brachial index. See Peripheral Artery Disease. Lumbar spinal stenosis causes neurogenic claudication instead: leg heaviness and cramping on standing and walking, relieved by sitting or leaning forward, and better uphill than downhill. See Spinal Stenosis.
Neurological Conditions That Mimic Cramp
Most cramps are benign; a minority are the opening symptom of a neurological disease. The pattern that raises the question is cramps plus fixed weakness, wasting or spreading twitching.
Motor neuron disease (ALS). Cramps are a genuinely common early symptom of amyotrophic lateral sclerosis, sometimes months before weakness is noticed. What distinguishes them is their company, not their character: cramps in unusual places (tongue, jaw, abdomen, hands), fasciculations that persist at rest and spread across the body, painless progressive weakness, wasting, foot drop, and slurred speech or swallowing trouble. Isolated cramps with normal strength are not ALS; cramps with new weakness need a neurologist. See ALS.
Benign cramp-fasciculation syndrome is the reassuring counterpart: widespread twitching plus cramps, but a normal examination, normal strength, and nerve conduction studies without denervation. It persists for years, fluctuates with stress and caffeine, and does not progress to motor neuron disease.
Neuropathy and radiculopathy. Damaged or irritated motor nerves are hyperexcitable, and cramps are one result. Diabetic, alcoholic, chemotherapy-induced, B12-deficient and hereditary neuropathies all cramp, usually alongside numbness, burning pain and lost ankle reflexes; and a single compressed nerve root can cause repeated cramps in exactly the muscles it supplies. See Peripheral Neuropathy and Numbness and Tingling.
Dystonia is a sustained twisting posture, not a cramp: writer's cramp appears only during that one task, and the posture is stereotyped and often eased by a "sensory trick" such as touching the affected part.
Metabolic myopathies. In McArdle disease and related glycogen storage disorders, intense exercise produces a painful contracture — a shortened muscle that is electrically silent on EMG, the diagnostic difference from a cramp. Look for exercise intolerance since childhood, a "second wind" after a few minutes' rest, and markedly raised creatine kinase.
Two rarer conditions round out the list: myasthenia gravis, which causes fatigable weakness rather than cramp, and autoimmune nerve hyperexcitability syndromes, which cause continuous rippling, stiffness and severe cramping and respond to immunotherapy.
Red Flags: When to Get Help Urgently
Cramping itself is rarely an emergency. These combinations are.
Emergency department now
- Severe muscle pain with dark, cola-coloured urine after extreme exertion, a fall with a long lie, heat illness, a new statin or a seizure — this is rhabdomyolysis, and myoglobin from breaking-down muscle can cause acute kidney failure. It needs immediate intravenous fluids.
- One leg suddenly painful, swollen, warm and red — deep vein thrombosis, not cramp. Do not massage it.
- One leg or foot suddenly cold, pale, numb and pulseless — acute arterial occlusion; limb salvage is measured in hours.
- Escalating pain, tightness and numbness in a limb after a fracture or crush injury, with pain far out of proportion — acute compartment syndrome, a surgical emergency.
- Cramps with confusion, seizures, collapse or a heart rhythm that feels wrong — severe electrolyte disturbance.
- Spasm of the hands and feet with tingling around the mouth, or throat spasm — acute hypocalcaemia, particularly after recent neck surgery.
- Generalised rigidity with high fever and confusion on antipsychotics or serotonergic drugs, or spasms with lockjaw after a dirty wound (tetanus).
- Cramps and weakness with difficulty breathing or swallowing — see Shortness of Breath.
A prompt appointment — days, not months
- New weakness or visible wasting with the cramps — dropping things, tripping, a foot that slaps the floor.
- Twitching that spreads beyond the muscle that cramps, or cramps in unusual locations: tongue, jaw, hands, abdominal wall, neck.
- Cramps starting within weeks of a new medication, particularly a diuretic or statin.
- Cramps reproducibly brought on by walking a set distance and relieved by standing still — possible claudication.
- Cramps with unexplained weight loss, fever or night sweats, or wrecking your sleep for weeks; or cramps in someone with known kidney, liver or thyroid disease.
How Cramps Are Evaluated
For a healthy adult with occasional night cramps, a careful history and examination are enough and no testing is needed. The history first asks whether it is truly a cramp — a hard, knotted muscle that cannot be voluntarily relaxed, relieved by stretch. If not, the differential shifts to claudication, dystonia, restless legs, contracture or neuropathic pain. Then: which muscles and how widely (calves only is reassuring, tongue and hands and trunk is not); timing; what provokes and relieves them; weakness, wasting, twitching, numbness, dark urine or weight change; the complete drug list with start dates; alcohol, bariatric surgery, chronic diarrhoea, pregnancy; and family history.
The examination covers muscle bulk and tone, looking for wasting in hands, shoulders and calves; strength, including rising from a chair without arms; fasciculations at rest in good light; reflexes (brisk with pathological reflexes suggests upper motor neuron involvement, absent ankle jerk suggests neuropathy, slow relaxation suggests hypothyroidism); sensation; peripheral pulses; signs of venous disease or oedema; and Chvostek and Trousseau signs if hypocalcaemia is possible.
Laboratory tests
- Basic metabolic panel — sodium, potassium, urea, creatinine, glucose, calcium — plus magnesium and phosphate, which are not in a standard panel and must be asked for specifically.
- TSH — hypothyroid myopathy is common and fully treatable.
- Creatine kinase — normal in ordinary cramps; raised in myopathy, statin myotoxicity, hypothyroidism and rhabdomyolysis.
- Liver panel, albumin and full blood count; ferritin if restless legs is in the picture; 25-hydroxyvitamin D and B12 where deficiency is plausible; HbA1c if neuropathy is suspected.
Second-line testing is targeted. Nerve conduction studies and EMG are the key test when weakness, wasting or widespread fasciculation is present, because they separate neuropathy, radiculopathy, motor neuron disease, myopathy and electrically silent contracture. Otherwise: arterial duplex for claudication, venous duplex for a DVT, lumbar MRI for neurogenic claudication, and parathyroid hormone, morning cortisol or muscle biopsy as the picture dictates.
What Actually Helps
In the moment: stretch the cramping muscle and hold it 20–30 seconds. Calf — straighten the knee and pull the toes up towards the shin, or lean forward against a wall with the heel down. Hamstring — straighten the knee and bend forward at the hip. Foot or toes — pull the toes back and press the arch. This is the highest-yield intervention there is. Then walk on it gently and use massage and warmth for the residual soreness. Do not fight it by contracting the opposing muscle; that can trigger a cramp there too.
Prevention with the best evidence
- Nightly calf and hamstring stretching — three sets of a 10-second hold per muscle, immediately before bed, every night.
- Sleep positioning — keep bedding loose over the feet so the ankle is not forced into point; a footboard, a loosely tucked top sheet, or lying prone with the feet over the mattress edge all keep the calf longer.
- Regular gentle activity — walking or stationary cycling, breaking up long unbroken sitting; adequate but not excessive fluid; footwear with some heel support; compression stockings where there is venous insufficiency; less alcohol and evening caffeine.
- Correct what is actually deficient, treat hypothyroidism, and review the medication list — diuretics first.
Supplements: an honest summary
Magnesium is no better than placebo for idiopathic cramps in older adults on Cochrane review, inconclusive in pregnancy, and clearly indicated when magnesium is low. Citrate or glycinate 200–400 mg elemental at night is safe to trial for a few weeks; the main side effect is loose stools, and it must be avoided or dose-reduced in kidney impairment. Potassium and calcium should be corrected if low but offer no benefit at normal levels, and unnecessary potassium carries cardiac risk.
When medication is warranted
- Quinine reduces cramp frequency by roughly 28% in the Cochrane review by El-Tawil and colleagues — genuine but small. It also causes sometimes fatal thrombocytopenia, haemolytic uraemic syndrome and arrhythmia, which is why the US FDA and other regulators warn against using it for cramps at all.
- Diltiazem 30 mg at night has limited positive trial data and a far safer profile; mexiletine has some support in motor neuron disease and needs cardiac supervision.
- Gabapentin, baclofen and tizanidine are used pragmatically on weak evidence, and carry sedation and fall risk in older adults.
- Midodrine and slower ultrafiltration for dialysis cramps; botulinum toxin for focal dystonia.
The American Academy of Neurology's evidence-based review concluded that no agent has strong enough evidence for routine recommendation, and that quinine should be avoided outside carefully selected cases — which is why the unglamorous mechanical measures deserve a disciplined trial first.
What to Expect Over Time
Idiopathic nocturnal cramps run in clusters over a lifetime rather than disappearing for good, and frequency rises with age. With nightly stretching, sleep positioning and a medication review, most people get from several bad nights a week down to occasional episodes — but "occasional cramps forever" is a more realistic goal than "never again." Give any preventive measure four to six weeks before judging it, and keep a diary, because memory exaggerates the bad weeks.
Exercise-associated cramps improve with training matched to race intent and pace reduction at the first twinge, but still recur for years: prior cramping remains the strongest predictor of future cramping. Drug-induced cramps usually settle within days to a few weeks of stopping the culprit. If a statin was blamed but was not responsible — the more common situation — the cramps continue after stopping it, which is itself useful information.
Cramps from a treatable disease follow the disease: hypothyroid cramps resolve over one to three months of adequate replacement, dialysis cramps improve with prescription changes, cirrhosis-related cramps often persist, and pregnancy cramps resolve after delivery. In cramp-fasciculation syndrome the reassurance of a normal EMG is itself part of the treatment, because anxiety amplifies awareness of twitching.
Two closing points matter more than any single remedy. Cramps stable in character over months are far more reassuring than cramps that are changing — spreading to new muscles, arriving with weakness or wasting; track the pattern, not just the count. And this symptom is genuinely disruptive, yet people are routinely told it is nothing. Persistent, sleep-destroying cramps deserve a proper look at the medication list and a basic set of labs.
Connections
- All Symptoms
- Numbness and Tingling
- Joint Pain
- Cold Hands and Feet
- Fatigue
- Magnesium
- Potassium
- Calcium
- Restless Legs Syndrome
- Peripheral Neuropathy
- ALS
- Peripheral Artery Disease
References & Research
Key Research Papers
- Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews. 2020;(9):CD009402 — Search PubMed.
- Garrison SR, Dormuth CR, Morrow RL, Carney GA, Khan KM. Nocturnal leg cramps and prescription use that precedes them: a sequence symmetry analysis. Archives of Internal Medicine. 2012;172(2):120-126 — Search PubMed.
- Hallegraeff JM, van der Schans CP, de Ruiter R, de Greef MHG. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial. Journal of Physiotherapy. 2012;58(1):17-22 — Search PubMed.
- Coppin RJ, Wicke DM, Little PS. Managing nocturnal leg cramps — calf-stretching exercises and cessation of quinine treatment: a factorial randomised controlled trial. British Journal of General Practice. 2005;55(512):186-191 — Search PubMed.
- El-Tawil S, Al Musa T, Valli H, et al. Quinine for muscle cramps. Cochrane Database of Systematic Reviews. 2015;(4):CD005044 — Search PubMed.
- Katzberg HD, Khan AH, So YT. Assessment: symptomatic treatment for muscle cramps (an evidence-based review). Report of the Therapeutics and Technology Assessment Subcommittee of the American Academy of Neurology. Neurology. 2010;74(8):691-696 — Search PubMed.
- Schwellnus MP. Cause of exercise associated muscle cramps (EAMC) — altered neuromuscular control, dehydration or electrolyte depletion? British Journal of Sports Medicine. 2009;43(6):401-408 — Search PubMed.
- Schwellnus MP, Drew N, Collins M. Increased running speed and previous cramps rather than dehydration or serum sodium changes predict exercise-associated muscle cramping: a prospective cohort study in 210 Ironman triathletes. British Journal of Sports Medicine. 2011;45(8):650-656 — Search PubMed.
- Sulzer NU, Schwellnus MP, Noakes TD. Serum electrolytes in Ironman triathletes with exercise-associated muscle cramping. Medicine and Science in Sports and Exercise. 2005;37(7):1081-1085 — Search PubMed.