Verified Supplement Data Evidence-based supplement comparisons

Leg Cramps at Night Every Night? Here's What Actually Helps

By Verified Supplement Data · Published · Methodology · About Us

The evidence: A 2021 randomized, double-blind trial of 175 adults found magnesium supplementation significantly reduced nocturnal leg cramp frequency (-3.4 vs -2.6 episodes, P=0.01), reduced cramp duration (P<0.007), and improved sleep quality (P<0.001) compared to placebo (PMID: 34719399).

What to try: Magnesium glycinate 400mg/day ($0.24/day), taken before bed. Give it 2-4 weeks. This is the lowest-risk, lowest-cost intervention with clinical evidence behind it.

Why Your Legs Cramp at Night

Nocturnal leg cramps (NLCs) are sudden, involuntary contractions — usually in the calves — that wake you from sleep. They affect about 60% of adults at some point, and roughly 20% experience them frequently enough to seek treatment. They're more common after age 50.

The exact mechanism isn't fully understood, but the leading causes are:

  • Electrolyte imbalance — Magnesium, potassium, sodium, and calcium all regulate muscle contraction and relaxation. Low magnesium is the most common nutritional cause.
  • Nerve hyperexcitability — When magnesium is low, motor neurons fire more easily, triggering involuntary contractions.
  • Dehydration — Even mild dehydration concentrates electrolytes and can trigger cramping.
  • Prolonged positioning — Sitting all day or sleeping with feet pointed (plantar flexion) shortens calf muscles.
  • Medications — Diuretics, statins, and beta-agonists are associated with increased cramp frequency.
  • Circulation — Peripheral artery disease can cause cramps, though these typically occur during activity, not rest.

The Clinical Evidence for Magnesium

What Works: Nocturnal Leg Cramps Specifically

A 2021 randomized, double-blind, placebo-controlled, multicenter trial (Barna et al., PMID: 34719399) studied 175 adults with frequent nocturnal leg cramps:

  • Both groups improved (natural regression), but the magnesium group improved significantly more
  • Cramp episode reduction: -3.4 vs -2.6 (P=0.01)
  • Cramp duration: significantly reduced (P<0.007)
  • Sleep quality: significantly improved (P<0.001)
  • Well tolerated — no serious adverse events

This is the strongest individual study supporting magnesium specifically for nighttime cramps.

The Broader Picture (Honest Assessment)

A 2020 Cochrane review (PMID: 32956536) of 11 trials (735 participants) found magnesium is "unlikely to provide clinically meaningful cramp prophylaxis" for general idiopathic cramps in older adults. However, this review lumped different cramp types together. The nocturnal-specific evidence (Barna 2021) is more positive.

Our interpretation: Magnesium probably won't fix all muscle cramps. But for nocturnal leg cramps specifically — the ones waking you up at 3am — the evidence supports trying it. It's safe, cheap, and the one well-designed RCT is positive. Read our full evidence review.

What To Try (In Order)

1. Magnesium Glycinate Before Bed

Start here. Take 300-400mg elemental magnesium glycinate 30-60 minutes before bed. The trial used magnesium oxide, which has very low bioavailability (~4%). Glycinate is much better absorbed, so it may work even better.

Recommended magnesium for nocturnal leg cramps (take before bed)
ProductCost/DayNotesBuy
Vitamin Shoppe Mg Glycinate 400mg $0.24 Full 400mg dose in 2 tablets. Best value. Buy on Amazon
Nature Made Mg Glycinate (USP Verified) $0.47 Independently tested. Need 2 capsules for 400mg. Buy on Amazon
BulkSupplements Mg Glycinate Powder $0.18 Cheapest option. Mix with water before bed. Buy on Amazon

2. Hydration and Stretching

  • Drink water throughout the day — Not just before bed (that causes bathroom trips). Consistent hydration prevents electrolyte concentration.
  • Stretch calves before bed — 30-second holds on each leg. Stand facing a wall, step one foot back, press heel into floor.
  • Avoid sleeping with pointed toes — Keep feet neutral or slightly flexed. A pillow at the foot of the bed can help.

3. Check Your Medications

Some medications increase cramp risk:

  • Diuretics (furosemide, hydrochlorothiazide) — deplete magnesium and potassium
  • Statins (atorvastatin, rosuvastatin) — associated with muscle-related side effects
  • Beta-agonists (albuterol) — can cause muscle tremors

Don't stop any prescribed medication — but talk to your doctor about whether your cramps might be medication-related.

4. When to See a Doctor

See a healthcare provider if cramps:

  • Happen every night despite supplementation and stretching
  • Are severe enough to cause lasting muscle pain
  • Started after a new medication
  • Are accompanied by swelling, numbness, or skin changes in the leg
  • Occur during walking (may indicate peripheral artery disease)

Frequently Asked Questions

Why do I get leg cramps at night?

Most commonly: magnesium deficiency, dehydration, prolonged sitting/standing, certain medications, or age. About 60% of adults experience nocturnal leg cramps, more commonly after age 50.

Does magnesium help with leg cramps at night?

A 2021 RCT of 175 adults found magnesium significantly reduced nocturnal cramp frequency (P=0.01), duration (P<0.007), and improved sleep (P<0.001). The broader evidence is mixed, but the nighttime-specific evidence supports trying it.

What is the best magnesium for leg cramps?

Magnesium glycinate at 300-400mg before bed. Best value: Vitamin Shoppe Magnesium Glycinate 400mg at $0.24/day. The clinical trial used magnesium oxide, but glycinate has much higher bioavailability.

Related

Sources

  1. Barna O, et al. "Efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps." Nutr J. 2021;20:90. PMID: 34719399
  2. Garrison SR, et al. "Magnesium for skeletal muscle cramps." Cochrane Database Syst Rev. 2020;9(9):CD009402. PMID: 32956536
  3. NIH Office of Dietary Supplements. "Magnesium: Fact Sheet for Health Professionals." ods.od.nih.gov