Skip to content

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.

ApproachEvidenceWorth trying?
Stretching the muscle during a crampConsistent, mechanism-basedYes, first line
Daily calf stretches before bedMixed but some positive trials, no downsideYes
Hydration in heat or heavy workIndirect but soundYes
Magnesium supplementsRepeatedly no better than placebo (except possibly pregnancy)Generally no
Quinine or tonic waterModest benefit, rare fatal harms; tonic water too weak to workNo
Pickle juice, mustardSmall studies in exercise cramps only, unproven at nightOptional 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?
At night your calf muscles spend hours in a shortened position, especially lying with your toes pointed under the covers, and a shortened muscle cramps more easily when the nerve that drives it misfires. Age-related changes in nerves and tendons, daytime fatigue, and mild fluid shifts add to the effect. In most people no single cause is found.
Does magnesium actually work for leg cramps?
For ordinary night cramps in the general population, the honest answer is that well-conducted trials and a Cochrane review show magnesium works no better than placebo. The possible exception is pregnancy, where the evidence is mixed rather than negative. It is reasonable to correct a proven deficiency, but buying magnesium for cramps alone is unlikely to help.
What should I do during a cramp?
Straighten the leg and pull the toes firmly toward your shin, or stand and put weight through the leg with the heel down. Stretching the cramping muscle is the fastest reliable way to break the spasm. Massage and warmth can ease the ache that follows. The soreness afterward can last a day and is not a sign of damage.
Can I take quinine or drink tonic water for cramps?
Prescription quinine is no longer recommended for leg cramps. The FDA has warned repeatedly that it can cause severe, unpredictable blood reactions and deaths, and the benefit is modest. Tonic water contains far too little quinine to work and still carries a small risk of reaction in susceptible people. This is one remedy to retire.
Are night cramps a sign of poor circulation?
Usually not. Classic night cramps in an otherwise well person are rarely a circulation problem. The pattern that does suggest narrowed arteries is different: aching or cramping in the calf that appears after walking a predictable distance and eases within minutes of standing still. That pattern deserves a doctor's assessment of your pulses and cardiovascular risk.
What is the difference between cramps and restless legs?
A cramp is a painful, hard knot in the muscle that lasts seconds to minutes. Restless legs syndrome is an unpleasant crawling or fidgety urge to move the legs in the evening, relieved by movement and without a hard contracted muscle. They are treated completely differently, so the distinction is worth making clearly to your doctor.
When are leg cramps worth a doctor's visit?
See a doctor if cramps are frequent enough to wreck sleep, started after a new medicine, or come with swelling, weakness, numbness, wasting, or walking-related pain. Blood tests for kidney function, electrolytes, and sometimes thyroid function, plus a look at your medication list, cover the common findable causes.

Sources

  1. Mayo Clinic: Night leg cramps
  2. NHS: Leg cramps
  3. Cochrane: Magnesium for skeletal muscle cramps
  4. FDA: Serious risks of off-label quinine use
  5. Mayo Clinic: Claudication
  6. NINDS: Restless legs syndrome
Medically reviewed 26 August 2026How this was written and checked
A necessary note. This site is health education, not medical care. It cannot diagnose you and it does not replace a doctor who can examine you. Sessions and report reviews booked here are educational: they create no doctor-patient relationship, and no diagnosis, prescription or treatment order is issued. Never delay urgent care because of anything you read or hear here.

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.

Book a Clarity Session$149 · 20 minutes · written summary included
In an emergency, do not use this site. Chest pain, trouble breathing, weakness on one side, trouble speaking, heavy bleeding, serious injury, or thoughts of harming yourself: contact your local emergency service now.