Recovery

Magnesium for Leg Cramps: Does It Actually Help?

Medically reviewed by Medical Advisory Board Last reviewed 2026-07-28

The popular fix has weaker evidence than most people think — here is who it may help and what else causes cramps

Magnesium is a popular remedy for leg cramps, but the evidence for ordinary night-time cramps is weak. A Cochrane review found magnesium was unlikely to give a meaningful benefit for idiopathic cramps in the general population, though it may help specific groups and correct a true deficiency. Because cramps have many causes, from dehydration to medications, magnesium is worth a low-risk try but is not a guaranteed fix.

Reaching for magnesium is one of the first things people try for leg cramps, and it makes intuitive sense: magnesium helps muscles relax. But intuition and evidence do not fully line up here. For common night-time leg cramps with no clear cause, the research is underwhelming.

This guide gives the honest picture: what the best evidence shows, who magnesium may still help, the other causes of cramps worth ruling out, and when to see a doctor. Magnesium is low-risk to try, so this is about setting realistic expectations rather than talking you out of it. For the wider role of magnesium, see our magnesium for sleep guide and the signs of magnesium deficiency.

Want expert help with your sleep and recovery?

We can match you with a sleep-medicine specialist who understands this area — so you get the right doctor, not just any doctor.

Book An Appointment With A Specialist →

What the Evidence Says About Magnesium and Leg Cramps

For ordinary leg cramps with no clear cause, the best evidence suggests magnesium probably does not help much. A Cochrane review, which pools the strongest available trials, concluded that magnesium is unlikely to provide a clinically meaningful reduction in idiopathic cramps for the general population, mostly older adults. That is a careful, well-regarded assessment, not a single small study.

This surprises people because magnesium is so widely recommended for cramps. The likely reason it disappoints is that most night-time cramps are not caused by low magnesium in the first place, so topping up magnesium does not fix the real trigger. Where a true magnesium shortfall exists, correcting it can help, but that is a narrower situation than the popular reputation suggests.

Who Magnesium May Still Help

Magnesium is most likely to help people who are genuinely low in it or who have a condition that depletes it. If your diet is poor in magnesium, or you take medications or have conditions that drain it, correcting the shortfall is reasonable and may ease cramps along with other symptoms.

Pregnancy is a special case, and the evidence there is mixed. Some studies suggest magnesium may reduce leg cramps in pregnancy while others show little effect, so results are inconsistent. Pregnant people should ask their provider before starting any supplement. For everyone else, magnesium is cheap and low-risk, so a short trial is fair even though the average benefit is small. Just do not expect it to work if a different cause is driving the cramps.

Other Common Causes of Leg Cramps

Leg cramps have many causes beyond magnesium, and finding the real trigger matters more than any single supplement. Common contributors include:

  • Dehydration and electrolyte shifts: low fluid, sodium, or potassium can trigger cramps, especially after heavy sweating or exercise.
  • Overuse and muscle fatigue: long days on your feet or new intense exercise can bring on night cramps.
  • Medications: diuretics (water pills) and statins are known to cause cramps or muscle aches in some people, and diuretics can also lower magnesium and potassium.
  • Circulation and nerve issues: poor circulation, pinched nerves, and certain thyroid or metabolic problems can play a role.
  • Pregnancy and aging: both raise the likelihood of night-time leg cramps.

Simple first steps often help more than supplements: stay hydrated, stretch the calves before bed, and ease into new exercise. If a medication lines up with the onset of cramps, tell your doctor rather than stopping it on your own.

How to Try Magnesium Sensibly

If you want to try magnesium for cramps, glycinate is a reasonable, well-tolerated form, and a common range is about 200 to 400 mg of elemental magnesium per day. The supplemental upper limit for adults is 350 mg per day to avoid digestive upset, so start low and build up slowly.

Give it a fair trial of a few weeks, since correcting a shortfall takes time. If cramps do not improve, magnesium is likely not your issue, and chasing higher doses is not the answer. People with kidney disease should only supplement under medical supervision, and anyone on diuretics or other medications should check with a doctor or pharmacist first. Compare forms in our glycinate vs citrate guide.

When to See a Doctor About Leg Cramps

See a doctor if leg cramps are frequent, severe, or getting worse, or if they disrupt your sleep night after night. Cramps that come with swelling, redness, warmth, numbness, or muscle weakness need prompt attention, since they can point to circulation problems, nerve issues, or a blood clot rather than a simple cramp.

Also check in if cramps started after a new medication, especially a diuretic or statin, or if you have kidney disease, diabetes, or thyroid problems. A doctor can review your medications, check electrolytes, and look for an underlying cause that a supplement cannot fix. For related energy and metabolic issues, see our lab testing hub and recommendations.

What Makes a Good Magnesium Supplement

Form matters more than dose: magnesium glycinate and citrate absorb well and are gentle on the stomach, while cheap magnesium oxide is poorly absorbed. A typical supplemental dose is 200–400 mg of elemental magnesium (check the label — it's usually lower than the pill weight). Take it in the evening if you're using it for sleep, and pick a third-party-tested brand.

Nature’s Bounty High Absorption Magnesium Glycinate 240 mg for Supporting Muscle Relaxation and Bone, Heart & Nerve Health – Non-GMO, Gluten-Free, Vegetarian, 120 Count/60 Servings
Nature’s Bounty High Absorption Magnesium Glycinate 240 mg for Supporting Muscle Relaxation and Bone, Heart & Nerve Health – Non-GMO, Gluten-Free, Vegetarian, 120 Count/60 Servings
Nature's Bounty
View on Amazon →
Magnesium Glycinate 400mg | 180 Capsules | Sleep, Muscle, & Heart Support | Vegan, Third Party Tested, Gluten Free, Non-GMO, by Double Wood Supplements
Magnesium Glycinate 400mg | 180 Capsules | Sleep, Muscle, & Heart Support | Vegan, Third Party Tested, Gluten Free, Non-GMO, by Double Wood Supplements
Double Wood Supplements
View on Amazon →

Frequently Asked Questions

Does magnesium help with leg cramps?

Magnesium may help if you are truly low in it, but for ordinary night-time cramps the evidence is weak. A Cochrane review found magnesium unlikely to give a meaningful benefit for idiopathic cramps in the general population. It is cheap and low-risk to try, but do not expect it to work if another cause is driving the cramps.

How long does magnesium take to work for leg cramps?

If magnesium is going to help, give it a fair trial of a few weeks, since correcting a shortfall takes time rather than working overnight. If cramps do not improve after that at a sensible dose, magnesium is probably not your issue, and it is better to look at hydration, medications, and other causes than to keep raising the dose.

What is the best magnesium for leg cramps?

Magnesium glycinate is a reasonable, well-tolerated choice because it absorbs well and rarely causes loose stools, so it is easy to take daily. Citrate works too but is more laxative. Whichever form you pick, a common range is about 200 to 400 mg of elemental magnesium per day, started low and increased slowly.

Is magnesium citrate or glycinate better for cramps?

For cramps, glycinate is the more comfortable daily choice because it absorbs well and rarely causes loose stools. Citrate works too but is more laxative, which can be a downside if you take it every night. Neither has strong evidence for ordinary cramps, so pick the form you tolerate best and keep the dose sensible.

Can dehydration cause leg cramps instead of low magnesium?

Yes. Dehydration and low sodium or potassium are common cramp triggers, especially after heavy sweating or exercise, and they are often more relevant than magnesium. That is one reason magnesium supplements disappoint for many people. Staying hydrated, replacing electrolytes after hard workouts, and stretching before bed often help more than a supplement.

What deficiency causes leg cramps?

Low magnesium, potassium, sodium, or calcium can all contribute to leg cramps, and dehydration often makes them worse. Diuretics can lower several of these at once. Because cramps have many causes, a supplement fixes them only when a true shortfall is the trigger, so persistent cramps deserve a medical review.

Topic updates

Get the weekly recovery roundup

Sleep, HRV, fatigue, burnout, cortisol rhythm, sleep apnea, overtraining, and stress physiology.

No spam. Unsubscribe anytime.

Medical Disclaimer: This content is for informational purposes only and does not constitute medical advice. Always consult a qualified healthcare provider before making changes to your health regimen.

Check Where You Stand

Take our free health assessment to understand your metabolic, hormonal, and recovery risk factors — and get personalized recommendations.

Take the Free Assessment →

Free · Takes 5 minutes · Instant results

Continue Reading

← Back to Sleep & Recovery

Affiliate disclosure: The Metabolic Journal is reader-supported. Some links above are affiliate or referral links and we may earn a commission at no extra cost to you. As an Amazon Associate we earn from qualifying purchases. Products are chosen on the merits; commissions never influence what we recommend. This is general information, not medical advice — talk to your clinician before acting.