A cramp is a motor nerve firing a muscle into sustained, painful contraction — most often calves and feet, most often at night, more with age, pregnancy, hard exercise, dehydration with heavy sweating, and certain medications (diuretics, statins occasionally). The modern evidence points at nerve excitability more than "low electrolytes" in ordinary cramps: stretching the muscle stops an acute cramp; regular calf stretching before bed reduces night cramps in trials; magnesium, despite its fame, performed no better than placebo in most non-pregnancy trials. Quinine works but is no longer recommended for cramps — rare fatal blood reactions. Cramps with weakness, wasting, or daytime walking pain that stops with rest need assessment.
What a cramp is
A cramp is not the muscle failing — it's the nerve over-succeeding: a motor neuron volley locks the muscle in full contraction, painfully, for seconds to minutes, leaving soreness that can last a day. Current physiology puts the fault mostly at the nerve and spinal-reflex level — altered excitability with age, fatigue, shortened positions and disease — rather than the folk model of an empty electrolyte tank, a shift that predicts what the trials then found: mechanical treatments outperforming mineral ones for ordinary cramps.
The census: nearly everyone occasionally; night calf-and-foot cramps in roughly a third to half of older adults; exercise-associated cramps in athletes at intensity beyond training; pregnancy's third-trimester cramps; and the medication column — diuretics (fluid and electrolyte shifts), statins (cramp-adjacent aches in a minority), beta-agonists, and stimulants — always worth reading against onset dates.
Stopping one, preventing the next
Acute: stretch the cramping muscle firmly opposite its pull — calf cramps: toes toward shin, heel down under body weight — then massage and heat; the FAQ's mouth-reflex tricks (pickle juice and kin) are legitimate curiosities for athletes.
Prevention, ranked by trials: nightly pre-bed calf stretching (the intervention with randomized support in older adults); untucked or loose bedding so feet aren't forced into the primed pointed position; graded training and pacing for exercise cramps, with fluids-and-sodium mattering in heavy-sweat conditions; hydration and alcohol moderation generally; review of the diuretic/statin column with the prescriber where the calendar fits; magnesium honestly framed per the FAQ — deficiency corrected, pregnancy reasonable, otherwise placebo-tier in the trials; and B-complex and vitamin E as small-file also-rans.
The retired remedy: quinine genuinely reduces cramps and regulators (FDA prominently) warn against using it for them — rare immune reactions destroy platelets, occasionally fatally, a terrible trade for a benign symptom. Tonic water's dose is too small to help and the wrong lesson anyway.
When cramps deserve a work-up
Most cramps are a nuisance with a stretching prescription. The exceptions — walking-triggered calf pain relieved by rest, weakness or wasting or persistent twitching alongside, statin-plus-dark-urine, the swollen hot single calf, cramping with neuropathy symptoms or poorly-behaved glucose, kidney disease, or frequency that escalates without explanation — route to a doctor with the two-week cramp diary that makes the visit efficient: timing, location, triggers, medications, and what stopped each one.
Related reading — heart palpitations shares the electrolyte questions, the magnesium entry in our ingredient index holds the honest dose-and-form data.
Frequently asked questions
Why do cramps strike at night in bed?
The sleeping position shortens the calf (toes pointed, muscle slack) — and a shortened muscle's spindle reflexes are primed to misfire; add age-related motor-nerve changes and any daytime fatigue, and 3 a.m. becomes cramp hour. It's also why the fix is mechanical: dorsiflexing hard (toes toward shin), standing on the leg, and why nightly pre-bed calf stretches — held 30 seconds, a few repeats — cut frequency in randomized trials of older adults.
Does magnesium help cramps or not?
The honest split: in pregnancy, small trials suggest modest benefit and it's reasonable; outside pregnancy, a Cochrane review of ordinary and older-adult night cramps found magnesium indistinguishable from placebo. It remains worth correcting genuine deficiency (diuretics, alcohol, poor intake — the magnesium page's list) and remains cheap and safe to trial for a month — but the cultural certainty that cramps mean magnesium is ahead of the evidence.
What about pickle juice, electrolyte drinks and salt?
Pickle juice's small famous studies show cramps releasing within ~90 seconds — faster than absorption allows — supporting a mouth-nerve reflex (acetic acid triggering throat receptors that calm the misfiring), not a sodium refill; that's also the mechanism behind commercial "cramp shot" products. Sweat-heavy exercise cramps do respect fluid and sodium replacement; the office worker's night cramp usually doesn't.
When are cramps a warning sign?
When they keep company: calf pain on walking that stops with rest (claudication — circulation), cramps with muscle weakness or visible wasting or twitching (neurological review), with statin use plus dark urine (urgent), new severe cramping with kidney disease or dialysis, in poorly controlled diabetes (glucose and nerve check), or one swollen hot calf — which isn't cramp territory at all but a clot question, same-day.
References
- MedlinePlus. Muscle Cramps (2023). https://medlineplus.gov/musclecramps.html
- NCCIH. Using Dietary Supplements Wisely (2019). https://www.nccih.nih.gov/health/using-dietary-supplements-wisely
This page contains no product recommendations or affiliate links. It is general health information, not personal medical advice. Read our editorial policy and medical review policy.