What Is the Best Magnesium to Take for Leg Cramps?

No single magnesium supplement has strong clinical proof behind it for preventing or relieving leg cramps. A Cochrane systematic review pooling data from multiple trials concluded that magnesium supplementation is unlikely to provide meaningful cramp relief for older adults, the group most commonly affected by nocturnal leg cramps. That said, the picture is not entirely hopeless: one multicenter trial did find a modest benefit, and some evidence suggests pregnant women may respond differently. If you decide to try magnesium anyway, forms like citrate and malate are absorbed more readily than the commonly sold magnesium oxide, though the best-absorbed form in the world still has to overcome the broader reality that the supplement itself has limited evidence for this particular use.

What the Clinical Trials Actually Show

The most authoritative summary of the evidence comes from a Cochrane review that pooled results from randomized controlled trials of magnesium for skeletal muscle cramps. For older adults with nocturnal leg cramps, the findings were clear: the difference in cramp frequency between magnesium and placebo was essentially zero, and neither cramp intensity nor cramp duration improved in a meaningful way. The review’s authors concluded that it is unlikely magnesium provides clinically meaningful cramp prevention in this population.1PubMed Central. Magnesium for skeletal muscle cramps

Individual trials back this up. A crossover trial published in The Journal of Family Practice found no significant differences between magnesium and placebo in any outcome measured, with the average number of cramps nearly identical in both groups.2PubMed. Magnesium for the treatment of nocturnal leg cramps: a crossover randomized trial A larger randomized trial published in JAMA Internal Medicine tested magnesium oxide against placebo and found that both groups improved by about the same amount: cramp frequency dropped in both arms, with no statistically significant difference between them.3JAMA Internal Medicine. Effect of Magnesium Oxide Supplementation on Nocturnal Leg Cramps: A Randomized Clinical Trial That last detail matters. Many people start magnesium and feel better, but the trials show that people taking a sugar pill tend to feel better too. The placebo effect in cramp trials is substantial, and it makes personal testimonials unreliable for judging whether magnesium actually did anything.

The One Positive Trial

Not every study came up empty. A multicenter, double-blind, placebo-controlled trial tested magnesium oxide monohydrate and found a statistically significant reduction in the number of nocturnal leg cramp episodes compared to placebo. Cramp duration also decreased, and sleep quality improved in the magnesium group.4PubMed Central. A randomized, double-blind, placebo-controlled, multicenter study assessing the efficacy of magnesium oxide monohydrate in the treatment of nocturnal leg cramps This study used a specific formulation of magnesium oxide monohydrate rather than the standard magnesium oxide used in most negative trials, and it ran across multiple centers with a larger sample. Still, it remains one positive trial against several negative ones and the overall weight of the Cochrane analysis, so it is best understood as a reason to keep investigating rather than as proof the question is settled.

Pregnancy-Related Leg Cramps Are a Different Story

Pregnant women get leg cramps frequently, and the evidence here is slightly more encouraging but still frustratingly mixed. A randomized controlled trial found that women taking oral magnesium were significantly more likely to experience at least a 50% reduction in cramp frequency compared to those on placebo, and cramp intensity also improved.5PubMed Central. Oral magnesium for relief in pregnancy-induced leg cramps: a randomised controlled trial However, another observational controlled trial of pregnant women found no difference between magnesium and placebo after four weeks of supplementation. Cramp reduction occurred in both groups at roughly the same rate.6PLOS ONE. Oral magnesium supplementation for leg cramps in pregnancy—An observational controlled trial

Pregnancy involves real physiological shifts in magnesium demand. Blood volume expands, the developing fetus draws minerals from the mother’s supply, and hormonal changes alter kidney handling of electrolytes. These factors create a plausible mechanism by which pregnant women might respond differently to supplementation than older adults whose magnesium status is relatively stable. But the trial-level evidence is split, and no clear consensus exists. If you are pregnant and bothered by cramps, magnesium is generally considered safe at standard supplemental doses, and your provider may recommend it as a low-risk option even though the data are not definitive.

How Different Magnesium Forms Compare

Walk into a supplement aisle and you will see magnesium glycinate, citrate, oxide, malate, taurate, threonate, and more. These names refer to the compound that magnesium is bonded to, and that companion molecule affects how well your body absorbs the magnesium and what side effects you might experience. The differences are real, even though they have not been directly tested in head-to-head cramp trials.

A study comparing the bioavailability of various magnesium supplements found wide variation in how well they dissolved and how much magnesium actually reached the bloodstream. Products with the best in vitro dissolution profiles also produced significantly higher serum magnesium levels after ingestion.7PubMed Central. Predicting and Testing Bioavailability of Magnesium Supplements In practical terms, this means the specific product you buy matters, not just the form on the label.

Here is what we know about the most common forms:

  • Magnesium citrate: Consistently shows higher absorption than oxide in comparative studies. It has moderate elemental magnesium content and is well-tolerated, though it can have a mild laxative effect at higher doses.
  • Magnesium malate: A pharmacokinetic study found it had the highest area under the curve of the forms tested, meaning magnesium levels in the blood stayed elevated for a longer period after taking it.8PubMed. Timeline (Bioavailability) of Magnesium Compounds in Hours: Which Magnesium Compound Works Best? This makes it an interesting option if sustained levels matter.
  • Magnesium glycinate: Widely recommended by clinicians for its tolerability. The glycine carrier tends to make it gentler on the stomach than citrate or oxide, and it is less likely to cause loose stools. It is often suggested for people who need higher doses without digestive side effects.
  • Magnesium oxide: The most commonly studied form in cramp trials and the cheapest on the shelf. It has the highest elemental magnesium per tablet but the lowest fractional absorption. Most of the negative trial results discussed earlier used magnesium oxide, which raises a fair question: would trials using better-absorbed forms have turned out differently? We do not have a clear answer, because nobody has run a large, rigorous cramp trial comparing citrate or glycinate to placebo.

The elephant in the room is that the form most commonly tested in trials, magnesium oxide, is also the one with the worst bioavailability. Advocates for glycinate or citrate argue that the negative trial results may partly reflect poor absorption rather than a genuine failure of magnesium to help. That is a reasonable hypothesis, but it remains unproven. Until someone runs proper trials with better-absorbed forms, we are left with educated guessing based on pharmacokinetic data rather than direct evidence from cramp outcomes.

Transdermal Magnesium Does Not Work

Magnesium sprays, creams, and bath salts are heavily marketed for muscle cramps, with claims that magnesium absorbs through the skin and goes straight to the muscles. A review evaluating the evidence behind transdermal magnesium concluded that these claims are scientifically unsupported.9PubMed Central. Myth or Reality-Transdermal Magnesium? The skin is an effective barrier against mineral absorption, and the concentrations achieved through topical application are far too low to meaningfully raise magnesium levels in muscle tissue. If a magnesium spray seems to help your cramps, the relief is coming from something else, possibly the massage action of rubbing it in or simply the passage of time.

Why Magnesium Deficiency Is Hard to Detect

One reason the magnesium-for-cramps question remains so murky is that we are surprisingly bad at measuring magnesium status. Over 99% of the body’s magnesium sits inside cells and bone, not in the blood. A standard serum magnesium test only captures what is floating in the bloodstream, which can look perfectly normal even when total body stores are depleted.10Open Heart. Subclinical magnesium deficiency: a principal driver of cardiovascular disease and a public health crisis

Researchers have argued that current “normal” reference ranges for serum magnesium are set too low because the populations used to establish those ranges unknowingly included people with chronic latent magnesium deficiency. A proposed updated lower cutoff of 0.85 mmol/L is meant to exclude those quietly deficient individuals, but it has not been universally adopted.11PubMed Central. Recommendation on an updated standardization of serum magnesium reference ranges The gold standard for assessing magnesium status, a loading test where you take a large dose and measure how much your kidneys retain, is impractical for routine use and unreliable in people with kidney problems.12British Journal of Nutrition. Update on the assessment of magnesium status

This measurement problem has real implications for interpreting cramp trials. If a study enrolls people without checking whether they are actually magnesium-depleted, and most of them happen to have adequate stores, supplementation would not be expected to help. It is possible that magnesium does relieve cramps in people who are genuinely deficient, but the trials have not been designed to test that specific question. The population most likely to be deficient, people taking diuretics, proton pump inhibitors, or eating a highly processed diet, overlaps heavily with the population most likely to get cramps, but connecting those dots in a controlled trial has not been done well.

Drug Interactions and Side Effects

Magnesium supplements interact with several common medications. The most clinically important interaction involves antibiotics: magnesium can bind to tetracycline antibiotics in the gut and reduce their absorption by more than 90%. It also reduces absorption of quinolone antibiotics like ciprofloxacin by 50 to 90%.13PubMed. Effects of antacids on the clinical pharmacokinetics of drugs. An update If you are prescribed either class of antibiotic, separate magnesium supplementation by at least two hours on either side of the dose.

The interaction also works in reverse. Several medications cause your body to lose magnesium. Diuretics, particularly the loop and thiazide types used for blood pressure and fluid retention, increase magnesium excretion through the kidneys. Proton pump inhibitors, the widely prescribed acid-suppressing drugs, can cause magnesium wasting with long-term use.14PubMed Central. Magnesium and Drugs If you take either of these drug classes and have leg cramps, it is worth discussing magnesium status with your doctor, because the cramps may be partly medication-induced.

For people with chronic kidney disease, the kidneys’ ability to excrete excess magnesium is reduced, which raises the risk of magnesium building up to unsafe levels. That said, research on magnesium supplementation in kidney disease stages 3 and 4 found it to be safe and well tolerated under medical supervision.15Kidney International Reports. Oral Magnesium Supplementation in Chronic Kidney Disease Stages 3 and 4: Efficacy, Safety, and Effect on Serum Calcification Propensity—A Prospective Randomized Double-Blinded Placebo-Controlled Clinical Trial The key word there is “under medical supervision.” Self-supplementing with impaired kidney function is not the same thing.

The most common side effect of oral magnesium at supplemental doses is loose stools or diarrhea, which is more pronounced with oxide and citrate forms. Glycinate and malate tend to cause less digestive upset. Staying within a supplemental dose of around 350 mg of elemental magnesium per day, the upper limit set by most dietary guidelines for supplemental (not dietary) intake, keeps side effects manageable for most people.

Stretching and Other Non-Supplement Approaches

Given that the magnesium evidence is weak, it is worth knowing what else has been studied. Calf and hamstring stretching before bed has been tested in a randomized trial of adults 55 and older. After six weeks, the stretching group experienced a meaningful reduction in both the frequency and severity of nocturnal leg cramps compared to a no-intervention control group.16Journal of Physiotherapy. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial A Cochrane review rated this evidence as low to very low certainty but acknowledged the direction of the findings.17PubMed Central. Non‐drug therapies for the secondary prevention of lower limb muscle cramps

However, another trial that combined stretching advice with quinine cessation found no significant improvement in cramp frequency or severity from stretching alone at 12 weeks.18PubMed Central. Managing nocturnal leg cramps–calf-stretching exercises and cessation of quinine treatment: a factorial randomised controlled trial So even the stretching evidence is inconsistent, which speaks to how genuinely difficult nocturnal leg cramps are to treat across the board. The honest picture is that no intervention, supplements or otherwise, has a strong and consistent evidence base for preventing leg cramps in the general adult population. Stretching costs nothing and has no side effects, which makes it worth trying even with imperfect data.

How Magnesium Fits Into the Larger Muscle Cramp Puzzle

Part of the reason magnesium trials have been disappointing may be that we have been oversimplifying what causes cramps in the first place. Magnesium does play a real role in muscle physiology. It acts as a natural membrane stabilizer, opposing states of hyperexcitability in nerve and muscle cells by modulating calcium channels and neurotransmitter release.19PubMed. The Impact of Chronic Magnesium Deficiency on Excitable Tissues-Translational Aspects In cell studies, magnesium deficiency impairs muscle cell development and makes muscle fibers more vulnerable to damage, while adequate or high magnesium helps preserve calcium signaling during repeated stress.20PubMed Central. Magnesium Preserves Calcium Homeostasis and Contributes to Protect Myotubes from Inflammation-Induced Damage

But leg cramps are not simply a magnesium deficiency symptom. The pathophysiology of neurogenic cramps involves disrupted nerve signaling, abnormal electrical transmission between nerve fibers, and changes in sensory feedback loops, none of which are solely governed by magnesium.21PubMed. Neurogenic muscle cramps Exercise-associated cramps have been attributed to neuromuscular fatigue rather than electrolyte imbalances, and some researchers have specifically argued that magnesium, calcium, and potassium deficits have been falsely blamed for cramping during exercise.22Current Sports Medicine Reports. Muscle Cramps during Exercise-Is It Fatigue or Electrolyte Deficit? This does not mean electrolytes never matter, but it does suggest that the popular framing of “cramp equals mineral deficiency” is too simplistic. Cramps probably have multiple interacting causes, and a mineral supplement only helps when that particular mineral is actually part of the problem for that particular person.

When Leg Cramps Might Be Something Else

Before spending money on supplements, it is worth confirming that what you are experiencing is actually a muscle cramp and not something else. Nocturnal leg cramps are sudden, painful, involuntary contractions, usually in the calf, that you can often feel as a hard knot under the skin. They typically last seconds to minutes and resolve on their own or with stretching. Restless legs syndrome, which is sometimes confused with cramps, is a different condition entirely: it involves an uncomfortable urge to move the legs rather than a painful contraction, and it tends to come on during rest or in the evening.23PubMed. Differentiating nocturnal leg cramps and restless legs syndrome The treatments for the two are completely different, and magnesium is not established for restless legs syndrome either.

Frequent or severe cramps can also signal underlying conditions worth investigating, including peripheral neuropathy, circulatory problems, thyroid disorders, or medication side effects. If your cramps are happening most nights, worsening over time, or accompanied by muscle weakness, numbness, or swelling, those are reasons to see a doctor rather than self-treat with a supplement. For the occasional, annoying nighttime cramp that most adults experience from time to time, the evidence suggests you are unlikely to find a reliable fix in any bottle, but a short trial of a well-absorbed magnesium form alongside some nightly calf stretches is a reasonable, low-risk place to start.

Sabrina Kaplan

Sabrina Kaplan, PharmD, RPh, is a retail pharmacist based in Cody, Wyoming. She works weekend shifts behind the counter dispensing prescriptions and advising local patients on proper dosing routines. Kaplan completed a BS in Pharmaceutical Sciences followed by a doctoral degree in pharmacy, and she covers medication safety as a contributor to Biology Insights.