Skip to content

Magnesium

A mineral found in green leafy vegetables, nuts, seeds and whole grains. It is sold as a supplement for sleep and for muscle cramps.

Explained simply · Last reviewed

What it is

Magnesium is a mineral that is plentiful in the body and naturally present in many foods. The NIH Office of Dietary Supplements (ODS) names green leafy vegetables, legumes, nuts, seeds and whole grains as good sources. A 2021 review of sleep trials says magnesium is often claimed to improve sleep, and describes it as an over-the-counter sleep aid. A 2020 Cochrane review says many magnesium supplements sold without a prescription are actively marketed for muscle cramps.

More about Magnesium

The NIH Office of Dietary Supplements (ODS) names green leafy vegetables, legumes, nuts, seeds and whole grains as good sources. A 2021 review of sleep trials says magnesium is often claimed to improve sleep, and describes it as an over-the-counter sleep aid. A 2020 Cochrane review says many magnesium supplements sold without a prescription are actively marketed for muscle cramps.

ODS says magnesium is a cofactor in more than 300 enzyme systems that regulate reactions in the body, including protein synthesis, muscle and nerve function, blood sugar control, and blood pressure regulation. It reports that 50% to 60% of the body's magnesium is in the bones. It notes that magnesium is also added to some breakfast cereals and other fortified foods. It adds that some medicines, such as antacids and laxatives, contain magnesium.

The Cochrane review describes magnesium supplements as salts that typically combine magnesium with citrate, lactate, chloride, oxide or others. It says most are tablets, and some are liquids, or powders or crystals to dissolve in water.

Also known as: magnesium citrate, magnesium glycinate, magnesium oxide, magnesium chloride

At a glance

Safety: known risks, 2 groups who should avoid it or take extra care and 5 documented interactions. See Safety ↓

Claims made about Magnesium, and how strong the evidence is for each:

Each rating follows our published rules and the sources cited for it. We don’t add our own medical judgment. How we rate

Safety

Read this before the ratings below.

Risks

  • High doses from supplements commonly cause diarrhea, nausea, and stomach cramping. Magnesium carbonate, chloride, gluconate, and oxide are the forms most often reported to do this.
  • Very large doses — typically more than 5,000 mg a day, usually from magnesium-containing laxatives or antacids — have caused magnesium toxicity. Signs include low blood pressure, vomiting, difficulty breathing, irregular heartbeat, and cardiac arrest. A few fatal cases have been reported.
  • Magnesium from food is not a risk for healthy people, because the kidneys clear what you do not need.

Who should avoid it or take extra care

  • People with impaired kidney function or kidney failure: the risk of magnesium toxicity rises because the body can no longer clear the excess.
  • Anyone taking the medications listed below on a regular basis should talk to their doctor or pharmacist about magnesium.

Documented interactions

  • Oral bisphosphonates (for example alendronate/Fosamax): Magnesium-rich supplements can reduce how much of the bisphosphonate your body absorbs. The cited authority reports that taking them at least 2 hours apart can minimize this. Source [1]
  • Tetracycline and quinolone antibiotics (for example doxycycline, ciprofloxacin): Magnesium binds to these antibiotics and forms a compound the body cannot absorb. The cited authority advises taking these antibiotics at least 2 hours before, or 4 to 6 hours after, a magnesium supplement. Source [1]
  • Loop and thiazide diuretics (for example furosemide/Lasix, hydrochlorothiazide): Long-term use increases magnesium loss in urine and can lead to magnesium depletion. Potassium-sparing diuretics do the opposite and reduce magnesium loss. Source [1]
  • Proton pump inhibitors (for example esomeprazole/Nexium, lansoprazole/Prevacid): Taken for prolonged periods — typically more than a year — these can cause low blood magnesium. In cases the FDA reviewed, supplements often corrected it, but in about 25% they did not and the medication had to be stopped. Source [1]
  • Zinc: One study cited by the authority found that very high doses of zinc from supplements can interfere with magnesium absorption and disrupt the magnesium balance in the body. Source [1]

Safety sources: Source [1]

What the evidence says

Each claim is rated on its own evidence. Ratings follow the scale on our methodology page.

  • Improves sleep quality Evidence rating: Limited

    People who have trouble sleeping take it hoping it will help them fall asleep faster and sleep better.

    A 2021 review found older adults with insomnia fell asleep about 17 minutes faster on magnesium than on placebo, in two trials of 55 people, and rated the evidence low to very low quality.

    A 2021 meta-analysis included three randomized trials comparing magnesium with placebo in 151 older adults with insomnia. Its results for time to fall asleep and total sleep time pooled two of those trials, in 55 people. Those taking magnesium fell asleep about 17 minutes faster than those on placebo. Total sleep time was around 16 minutes longer, but that difference was not statistically significant.

    The reviewers judged all three trials at moderate-to-high risk of bias. They rated the evidence low to very low quality. They concluded that the literature is not strong enough for doctors to make well-informed recommendations.

    Sources: Source [1]Source [2]

  • Prevents muscle cramps Evidence rating: Evidence against

    People with night-time leg cramps take it hoping the cramps will come less often.

    A 2020 Cochrane review found no significant difference between magnesium and placebo in how often older adults had cramps, and rated that finding moderate certainty.

    A 2020 Cochrane review included 11 trials in 735 people. For cramps with no obvious cause, largely in older adults presumed to have night-time leg cramps, it found no significant difference from placebo in how often, how intensely, or how long cramps occurred. The reviewers concluded it is unlikely that magnesium provides clinically meaningful cramp prevention for older adults.

    How sure the reviewers were (certainty) varied by outcome. It was moderate for the measures of how often and how intensely cramps occurred, and high for one frequency measure. The single measure of how long cramps lasted rested on one trial of 46 people and was rated low.

    For leg cramps in pregnancy, the reviewers described the literature as conflicting and called for more research. They found no trials at all testing magnesium for cramps linked to exercise.

    Sources: Source [1]

How and when to take it

What the cited sources say about taking it. Ask your doctor or pharmacist what applies to you.

  • Keep it well apart from certain antibiotics

    Magnesium binds to tetracycline and quinolone antibiotics and stops them being absorbed. The cited authority advises taking those antibiotics at least 2 hours before, or 4 to 6 hours after, a magnesium supplement. Source [1]

  • Keep it well apart from oral bisphosphonates

    Magnesium-rich supplements can reduce how much of the medication is absorbed. The cited authority reports that taking them at least 2 hours apart can minimize this. Source [1]

  • The form affects how likely it is to upset your stomach

    The cited authority reports that magnesium carbonate, chloride, gluconate, and oxide are the forms most often associated with diarrhea. Source [1]

Which form the evidence used

Supplements are sold in several forms. This is what the sources on this page say about them — which form the research used, and any comparison those sources themselves made. Where they made none, this page does not rank the forms.

  • Magnesium aspartate, citrate, lactate, or chloride, What the sources supportDetails

    The cited authority reports that small studies found magnesium in these forms is absorbed more completely, and is more bioavailable, than magnesium oxide and magnesium sulfate. It explains that forms dissolving well in liquid are absorbed more completely in the gut than less soluble ones. This is about absorption, not about whether magnesium helps any of the claims rated below. Source [1]

  • Magnesium oxide or sulfate, Details

    The same authority names these as the less bioavailable forms in those comparisons. It also lists oxide among the forms most often reported to cause diarrhea. Check the Supplement Facts panel for elemental magnesium, which the authority notes is the figure declared rather than the weight of the whole compound. Source [1]

Reference intake values

Quoted exactly as published by the cited authority. These are population reference values, not a recommendation for you. Ask your doctor or pharmacist what applies to your situation.

  • Men, 19–30 years

    Recommended intake
    400 mg
    Upper limit
    350 mg
  • Women, 19–30 years

    Recommended intake
    310 mg
    Upper limit
    350 mg
  • Men, 31+ years

    Recommended intake
    420 mg
    Upper limit
    350 mg
  • Women, 31+ years

    Recommended intake
    320 mg
    Upper limit
    350 mg

What the upper limits count: “The ULs only include magnesium from dietary supplements and medications; they do not include magnesium found naturally in food and beverages.” Source [1]

Sources

  1. Oral magnesium supplementation for insomnia in older adults: a Systematic Review & Meta-Analysis
    BMC Complementary Medicine and Therapies, 2021 · Meta-analysis · Primary source · Certainty: very low
  2. Correction: Oral magnesium supplementation for insomnia in older adults: a Systematic Review & Meta-Analysis
    BMC Complementary Medicine and Therapies, 2024 · Systematic review · Supporting source
  3. Magnesium for skeletal muscle cramps
    Cochrane Database of Systematic Reviews, 2020 · Systematic review · Primary source · Certainty: very low
  4. Magnesium: Fact Sheet for Health Professionals
    NIH Office of Dietary Supplements, 2026 · Health authority summary · Primary source

Page history

Show all 9 changes to this page
  • — Rewritten to the content style guideline; ratings and sources unchanged.
  • — The interaction timing advice for bisphosphonates and antibiotics, in both the interactions list and the how-to-take notes, and the description of the roles magnesium plays in the body, are now attributed to the NIH Office of Dietary Supplements rather than stated in the site's own voice. No rating changed.
  • — Corrected the sleep summary after reading the 2021 meta-analysis in full: it included three trials in 151 older adults, but its sleep-onset and total-sleep-time results pooled two of those trials, in 55 people. The Cochrane cramps review is now listed at very low certainty rather than low, because its full text rates one outcome, major adverse events, very low, and a source records its lowest-rated outcome. No rating changed.
  • — Added zinc to the interactions list: the NIH ODS magnesium factsheet reports one study finding that very high doses of zinc from supplements can interfere with magnesium absorption and disrupt magnesium balance. The zinc page already listed this interaction from the zinc side. No rating changed.
  • — Added a note under the reference intakes quoting what the NIH ODS upper limit counts: magnesium from supplements and medications, not from food and beverages. It replaces a site-wide sentence that said the same of every nutrient, which is not true of all of them. No value or rating changed.
  • — Re-checked against the new rule for recording GRADE certainty (the lowest across every outcome a review rates, not its primary endpoint). The 2020 Cochrane cramps review rates cramp duration and minor adverse events low, so its recorded certainty moves from moderate to low. The cramps rating is unchanged: evidence-against does not map from certainty. The sleep source already recorded its lowest outcome, very low.
  • — Added a "which form the evidence used" section. The cited authority makes an explicit absorption comparison — aspartate, citrate, lactate and chloride are more bioavailable than oxide and sulfate — so this entry reports that comparison rather than only naming a studied form. Read from a Wayback snapshot of the factsheet, since ODS blocks automated requests.
  • — First published. Sleep rated limited, muscle cramps rated evidence-against.
  • — Sources verified. Funding confirmed non-industry for all three journal sources (the Cochrane review is CIHR-funded; both BMC papers declare no competing interests), so industry_funded moved from unknown to false. Cramps summary now states the certainty per outcome instead of a single moderate-to-high range, because the review rates cramp duration low.