Leg Cramps at Night: Causes, Honest Fixes, and When It Is Something Else
A doctor explains why leg cramps strike at night, what the evidence really says about magnesium, why quinine is unsafe, and when cramps signal nerve or circulation trouble.

The short version
- Night leg cramps are sudden, painful muscle contractions, usually in the calf or foot, and in most people no underlying disease is ever found.
- They become much more common with age: roughly one in three adults over 60 gets them, and about half of people over 80.
- Magnesium supplements have repeatedly failed to beat placebo in trials for ordinary night cramps, and quinine is no longer recommended because it can cause rare but fatal reactions.
- Cramps are different from restless legs, from claudication caused by narrowed arteries, and from nerve compression, and telling them apart changes what a doctor looks for.
See a doctor promptly if
These are the signs that change this from something to read about into something to act on.
- Calf pain with swelling, warmth or redness in one leg: possible blood clot, seek urgent assessment
- Leg pain that comes on with walking a predictable distance and stops with rest: possible narrowed arteries
- Cramps with new weakness, numbness, or muscle wasting
- Severe cramps with dark, tea-colored urine after intense exertion or a new medicine
- Cramps that started after beginning a new prescription, especially diuretics or cholesterol medicines: worth a medication review, not stopping on your own
Few symptoms are as universally recognized as being yanked out of sleep by a calf locked in spasm. Night leg cramps are common, more so every decade after 50, and for most people they are a painful nuisance rather than a disease. But the topic is crowded with remedies that do not work and one that is actively dangerous, and a few look-alike conditions genuinely matter. It is worth sorting all of that out properly.
What a cramp actually is#
A cramp is not the muscle malfunctioning on its own. It is the nerve supply misfiring. The motor neurons that drive the calf fire in an uncontrolled burst, and the muscle obeys, contracting hard and staying contracted. On electrical testing, a cramping muscle shows rapid involuntary firing at rates far above voluntary contraction. That is why the muscle feels like wood and why stretching works: pulling the muscle long activates tension sensors that reflexively inhibit the misfiring nerve.
Why nights, and why calves? Current thinking points to position and age. Lying in bed, especially face up with the toes pointed, holds the calf in its shortest position for hours, and a shortened muscle is electrically twitchy. With age, motor nerves remodel, tendons shorten slightly, and the reflexes that normally damp excessive firing become less precise. Add a day of unusual exertion, standing on concrete, or mild dehydration, and the threshold drops further.
The soreness that lingers into the next day is the muscle equivalent of a bruise after a maximal contraction, and it settles on its own.
The common causes, ranked honestly#
Idiopathic, meaning no cause found, is by far the largest group, especially in older adults. This is not a failure of investigation. It reflects the age-related nerve changes above.
Medications are the most fixable group. Diuretics (water tablets) can deplete potassium and magnesium and change fluid balance. Statins cause muscle symptoms in a minority. Others on the list include some asthma inhalers in high use, certain blood pressure medicines, and stimulants. Never stop a prescription over cramps on your own, but do put the timeline in front of your prescriber.
Fluid and electrolyte shifts: heavy sweating, hot work, vomiting or diarrhea, low potassium, sodium, calcium, or magnesium, and dialysis.
Pregnancy, particularly the second and third trimesters, where cramps affect up to a third of women.
Medical conditions: kidney disease, liver disease including cirrhosis, an underactive thyroid, diabetes, and nerve disorders. These usually announce themselves with more than cramps.
Lifestyle contributors: unaccustomed exercise, long periods standing, alcohol, and possibly tightly tucked bedding that plantar-flexes the feet all night.
Magnesium: the honest verdict#
Magnesium is the best-selling cramp remedy in every pharmacy, so it deserves an honest look.
The theory is plausible: magnesium calms nerve excitability, and low magnesium can cause cramps. The trials, though, are consistent and disappointing. A Cochrane systematic review of randomized trials found that magnesium supplementation is unlikely to provide meaningful benefit for ordinary night cramps in older adults, with results indistinguishable from placebo across the studies. That is about as clear as evidence in this area gets.
Two honest footnotes. In pregnancy, results are mixed rather than clearly negative, and some doctors consider a trial reasonable there. And in someone with a genuinely low magnesium level, from diuretics, alcohol, gut disease, or certain acid-reducing medicines used long term, correcting the deficiency makes sense for its own reasons. What the evidence does not support is the routine purchase of magnesium for cramps in someone with normal levels. If you try it anyway, know that the placebo response in cramp trials is large, which is exactly why so many remedies have devoted fans.
Quinine: retire this one#
For decades, quinine was the standard prescription for cramps, and older readers may remember it, or still keep some. The evidence does show a modest benefit: roughly a quarter fewer cramps. The problem is the risk attached. Quinine can trigger an unpredictable immune reaction that destroys platelets, causing severe bleeding, and it can cause serious heart rhythm problems and a syndrome of fever, kidney failure and clotting abnormalities. The FDA has documented deaths in people taking it for cramps and has warned repeatedly, over many years, that it should not be used for this purpose. Regulators in other countries restrict it similarly.
For a benign symptom, that trade is not worth making. Tonic water is not a workaround: a glass contains a small fraction of the studied dose, far too little for effect, while the rare severe immune reaction can occur even at tiny exposures in susceptible people.
What actually helps#
The unglamorous truth is that the best-supported approaches are physical.
During a cramp: stretch. Straighten the knee and pull the foot and toes up toward the shin, or stand with the heel planted and lean forward. This breaks most cramps within a minute. Afterward, gentle massage and heat ease the residual ache.
Prevention: daily calf stretching, holding a stretch for around 10 to 30 seconds and repeating a few times, especially before bed, reduced cramp frequency in some trials of older adults, though not all. Light activity in the evening, such as a short walk or a few minutes on a stationary bike, may help. Keep well hydrated across the day, particularly in heat or physical work, and be sensible with alcohol. Loosen tightly tucked sheets, or use a pillow to stop the feet pointing down; side sleepers can let the feet hang naturally.
Some people report fewer cramps with footwear changes if they stand all day on hard floors, which costs nothing to test.
| Approach | Evidence | Worth trying? |
|---|---|---|
| Stretching the muscle during a cramp | Consistent, mechanism-based | Yes, first line |
| Daily calf stretches before bed | Mixed but some positive trials, no downside | Yes |
| Hydration in heat or heavy work | Indirect but sound | Yes |
| Magnesium supplements | Repeatedly no better than placebo (except possibly pregnancy) | Generally no |
| Quinine or tonic water | Modest benefit, rare fatal harms; tonic water too weak to work | No |
| Pickle juice, mustard | Small studies in exercise cramps only, unproven at night | Optional experiment, low risk |
When it is not a simple cramp#
Three look-alikes matter, and each has a distinct signature.
A blood clot (DVT) does not come and go in seconds. It causes persistent calf pain with swelling, warmth, and sometimes redness in one leg, often after immobility, surgery, long travel, or in people with clotting risk. A cramp that "will not release" over hours, in a swollen leg, is not a cramp. That is an urgent assessment, the same day.
Claudication from narrowed leg arteries is the circulation problem people worry about, and its pattern is nearly the opposite of night cramps. The pain arrives with walking, at a reproducible distance, forces you to stop, and fades within minutes of rest. The muscle does not knot; it aches from oxygen debt. Night pain from severe artery disease does exist, but it is a constant foot pain relieved by hanging the leg off the bed, not a calf spasm relieved by stretching. Claudication matters because it marks cardiovascular risk everywhere, not just in the leg, and it deserves pulses checked and risk factors treated.
Nerve problems produce their own patterns. Spinal stenosis in older adults causes aching or heaviness in both legs when walking or standing, eased by sitting or leaning forward on a shopping cart, and unlike claudication, it is posture that helps rather than mere rest. Peripheral neuropathy, commonly from diabetes, brings burning, tingling and numbness in the feet at night. Restless legs syndrome is an urge to move with crawling sensations, relieved by moving, with no hard contracted muscle. Cramps accompanied by weakness, wasting, or persistent numbness point to a nerve or muscle disorder and need a proper neurological review.
What I actually see in clinic#
In the occupational clinic, the cramp story I hear most belongs to men in their 50s and 60s doing hot, physical shifts. They sweat for hours, drink mostly coffee or tea, and cramp at 2am on the nights after the heaviest days. Their blood tests are almost always normal. What changes things is boring: a deliberate drinking plan across the shift, electrolyte replacement on the heaviest days in the hottest months, and calf stretches at the end of work and before bed. Not one of them believes stretching will work until the third week.
The question I am asked most is some version of "which supplement should I take". People are often visibly disappointed when I say the trial evidence for magnesium is negative, because a tablet feels like a more serious answer than a stretch. But I have also seen the other side: an older patient on quinine from years back, still taking it for a symptom that a change of bedding and a nightly stretch later controlled. The least impressive-sounding treatments in this field are the safest and, for most people, the most effective.
When to see a doctor#
Book an appointment if cramps are frequent enough to disturb sleep regularly, began after a new medicine, or occur alongside swelling, weakness, numbness, wasting, or pain on walking. A doctor will typically review your medications, examine strength, reflexes and pulses, and check kidney function, electrolytes, glucose, and sometimes thyroid function. Seek urgent care for a swollen, warm, painful calf, or for severe cramping with dark, tea-colored urine after intense exertion, which can signal muscle breakdown.
The bottom line#
Night leg cramps are common, usually harmless, and mostly a nerve-firing problem aggravated by age, shortened calf position in bed, medicines, and fluid shifts. Stretching, during the cramp and nightly as prevention, plus sensible hydration, is the strategy the evidence best supports. Magnesium rarely helps outside true deficiency or possibly pregnancy, and quinine is not worth its risks for anyone. Take a different pattern seriously: a swollen painful calf, pain that walking brings on and rest relieves, or cramps with weakness or numbness are not ordinary cramps, and each deserves a doctor's assessment.
Common questions
Why do leg cramps happen at night?
Does magnesium actually work for leg cramps?
What should I do during a cramp?
Can I take quinine or drink tonic water for cramps?
Are night cramps a sign of poor circulation?
What is the difference between cramps and restless legs?
When are leg cramps worth a doctor's visit?
Sources
Still not sure what this means for you?
Bring your reports to a call with one of our doctors. Leave with a written summary and the right questions for your own doctor.


