The answer so far

Magnesium is a mineral your body needs for many functions, including the work of muscles and nerves. Food is a major source. Supplements can help in certain circumstances, but high amounts can cause diarrhoea, nausea and cramps. Magnesium can also interfere with some medicines.1

On this page
  1. What the body uses it for
  2. What research can show
  3. Does a normal blood test rule out low magnesium?
  4. Can acid-reflux medicines lower magnesium?
  5. Does magnesium improve blood sugar in diabetes?
  6. Glycinate, citrate or oxide: what is the difference?
  7. How much magnesium is actually on the label?
  8. Can magnesium prevent migraine attacks?
  9. Does magnesium help sleep?
  10. Safety and interactions
  11. Sources
At a glance

Before you read the detail

What it is

A mineral needed for enzyme, nerve and muscle function, with food as a major source.1

What human evidence shows

Some studies report small changes, but varied products and populations do not establish benefits for everyone or every sleep, anxiety or exercise claim.25

Main cautions

High supplemental amounts can cause diarrhoea, nausea and cramps, and magnesium can interfere with some medicines.34

Current status

Suitability depends on product, dose, medicines and clinical context.1

What the body uses it for

Magnesium helps the body’s enzymes work. It also has roles in nerve and muscle function, blood-sugar regulation, bones and DNA. Foods that contain it include beans, nuts, seeds, whole grains and leafy greens.

Magnesium has important jobs in the body, but that does not mean taking extra will improve every aspect of health. For storage questions, see storing vitamins and minerals.1

As a US dietary reference for healthy adults, the recommended daily amount at ages 19–30 is 400 mg for men and 310 mg for women; from age 31 it is 420 mg for men and 320 mg for women. These amounts include magnesium from all sources. The US upper limit discussed below covers magnesium from supplements and medicines, not magnesium naturally present in food and drinks. Pregnancy and breastfeeding references vary with age, and guidance differs by country and individual circumstances. They are not doses for treating deficiency.3

Illustrations

Magnesium: sources and functionsSupplied illustration in English

Normal mineral functions do not establish that magnesium supplements improve sleep or prevent cramps.

Magnesium: sources and functionsOpen image at full size

What research can show

Studies vary in the people they include, the product and amount tested, and what they measure. Some have found small changes in blood pressure or symptoms. These findings do not prove a benefit for everyone or support every claim about sleep, anxiety or exercise. A magnesium supplement is not automatically interchangeable with a medicine or laxative containing magnesium.1

Does a normal blood test rule out low magnesium?

No. A serum magnesium test measures magnesium in the liquid part of the blood. It is commonly used and can be useful, but most magnesium is inside cells or in bone. The test does not precisely measure the body’s total stores.

A result within the laboratory range does not always rule out low stores. Equally, it does not prove a hidden deficiency. No single test is satisfactory in every situation. A clinician can consider the result alongside symptoms, diet, health conditions, medicines and other tests when needed. Long-lasting diarrhoea and conditions that affect absorption can increase the chance of low stores.3

Can acid-reflux medicines lower magnesium?

Some proton pump inhibitors (PPIs), medicines that reduce stomach acid, can lower blood magnesium during prolonged use. Examples include omeprazole and lansoprazole. NIH describes this most often after more than a year; NHS notes that levels may fall after more than three months with lansoprazole. Neither period is a guaranteed safe window or a prediction for an individual.

Low magnesium can have many causes, and some people have no symptoms. Symptoms can include muscle twitching or an irregular heartbeat; a seizure or collapse needs prompt assessment. Call emergency services for a first seizure, a seizure lasting more than five minutes when the usual duration is unknown, repeated seizures without regaining consciousness, or someone who remains unconscious. For a person with a known seizure condition, follow their emergency care plan. Palpitations that do not stop, or occur with chest pain, breathlessness, faintness or fainting, also need emergency help. These symptoms can have causes other than low magnesium. A clinician can consider the medicine, other risk factors and whether a blood test is appropriate. A normal blood result has limits, as explained above.

In some cases reviewed by the FDA, magnesium supplements alone did not correct the problem and a clinician had to reassess the PPI. Those selected reports do not tell us how often this happens among everyone taking a PPI. Do not stop a prescribed medicine or start supplements solely because of this article: discuss the exact medicine and any symptoms with a pharmacist or prescriber. For other mechanisms, see supplement–medicine interactions.3489

Does magnesium improve blood sugar in diabetes?

Some studies have examined magnesium and blood sugar. Results from small trials or people with low magnesium do not establish a benefit for everyone with diabetes.

The US National Institutes of Health reports that the American Diabetes Association found insufficient evidence to support routine magnesium supplements for blood-sugar control. That is a separate question from identifying and treating a confirmed deficiency. Do not replace prescribed diabetes treatment with a supplement; discuss your concerns with your care team.3

Glycinate, citrate or oxide: what is the difference?

Magnesium supplements combine the mineral with another substance. Examples include magnesium bisglycinate, citrate and oxide. The form can affect absorption and how well a product is tolerated.

Small studies cited by the US National Institutes of Health found that some forms, including citrate, were absorbed better than oxide. This does not establish one form as best for everyone or for every purpose. The sleep trial below compared bisglycinate with a placebo, not with citrate or oxide. Supplements also differ from magnesium-containing medicines used for specific purposes.32

How much magnesium is actually on the label?

On a US Supplement Facts panel, the listed amount is elemental magnesium: the mineral itself, not the total weight of the compound. Check the serving size and the amount per serving; a serving can be more than one tablet. Labels can differ by country. If you take several products, add up the amounts and check for repeated ingredients. See how to read a supplement label, and ask a pharmacist if a label or interaction is unclear.

For adults, US guidance sets an upper limit of 350 mg a day from magnesium in supplements and medicines. It does not include magnesium naturally present in food and drinks. This limit is not a target or a personal safe dose. Children’s limits differ, kidney disease changes the risk, and a clinician may recommend another amount for treatment. Do not change a prescribed medicine on your own.

Some magnesium products also contain vitamin B6. Check both amounts, particularly if you take another product with B6. The vitamin B6 guide explains how amounts can add up and why too much may harm nerves.37

Can magnesium prevent migraine attacks?

Possibly for some people, but the evidence is limited. The US National Institutes of Health describes several small, short trials that suggested fewer attacks with magnesium, and another that did not. Prevention means trying to reduce future attacks. This evidence does not show that a supplement will stop an attack already underway.

In a 1996 trial, 81 adults with migraine received a specific magnesium product or a placebo for 12 weeks. During the final four weeks, average attack frequency had fallen from the start of the study by about 42% in the magnesium group and 16% in the placebo group. These are group averages. They are not the percentage of people who improved or a prediction for an individual. Diarrhoea and stomach irritation were reported. This small, older trial does not establish that every product works the same way or that a benefit lasts long term.

Amounts studied for migraine prevention can exceed usual supplement upper limits. NIH advises doing this only with a healthcare professional’s supervision, especially when kidney function is reduced or other medicines are involved. A pharmacist or clinician can discuss diagnosis, interactions and established prevention options. Do not replace prescribed treatment on the basis of this study.53

Does magnesium help sleep?

A 2025 trial assigned 155 adults who reported poor sleep to magnesium bisglycinate or a placebo for four weeks. Both groups improved on a questionnaire about insomnia severity. The magnesium group improved by about 1.6 points more on average, an effect the authors described as small.

Of the 155 people assigned, 153 were included in the main analysis and 134 completed the four-week study. The trial excluded people with kidney or liver insufficiency and people who were pregnant or breastfeeding. It relied on people reporting their own sleep, did not establish lasting benefits and did not compare different forms of magnesium. A university institute funded the study; one author disclosed work and speaking fees connected with supplement companies. The findings do not prove magnesium treats insomnia or works for everyone. Discuss persistent sleep problems with a healthcare professional. See also melatonin and the body clock.

A 2025 US Veterans Affairs and Department of Defense guideline, published before this trial, found insufficient evidence to recommend for or against magnesium for chronic insomnia disorder. It recommends cognitive behavioural therapy for insomnia (CBT-I), a structured treatment addressing sleep habits and thoughts. Diagnosed chronic insomnia is not the same as the self-reported poor sleep studied in the trial.26

Safety and interactions

High amounts from supplements can cause diarrhoea, nausea and stomach cramps. Very high exposure can disturb heart rhythm. Magnesium can also interfere with the absorption of some antibiotics and osteoporosis medicines. When kidney function is impaired, the body may be less able to remove excess magnesium, increasing the risk of toxicity.13

Tell a clinician or pharmacist about kidney disease and all magnesium-containing products you take, including medicines, before considering a supplement. This article does not recommend a form or dose. Read supplement and medicine interactions.3

For example, magnesium can bind to the antibiotics doxycycline and ciprofloxacin in the gut, so less medicine is absorbed. It can also reduce absorption of oral alendronate, used for osteoporosis. Some antacids and laxatives contain magnesium too. Timing instructions differ by product and medicine. Ask a pharmacist about your specific combination rather than guessing a gap or changing prescribed treatment.3

NIH describes one study in which a very high zinc supplement amount—142 mg a day—interfered with magnesium absorption and balance. That does not show that every product combining the two causes this effect. Ask a clinician or pharmacist to review the amounts in all your products, particularly if taking high-dose zinc. See zinc and excess intake.3

Further reading

Trusted external resources selected to help explain this page. They open in a new tab.

Sources, kept close.

Selected supporting sources; this is not a complete literature review.

  1. Magnesium — ConsumerNIH Office of Dietary Supplements · Official consumer fact sheetAccessed 2026-11-03
  2. Magnesium Bisglycinate Supplementation in Healthy Adults Reporting Poor Sleep: A Randomized, Placebo-Controlled TrialNature and Science of Sleep · Randomized placebo-controlled trialAccess checked 2026-11-04 · Source date: 2025 · Four-week trial in adults reporting poor sleep, primarily self-reported outcomes; one author disclosed nutraceutical-industry relationships.
  3. Magnesium: Health Professional Fact SheetNIH Office of Dietary Supplements · Official nutrition evidence summary; United StatesAccessed 2026-11-04
  4. Common questions about lansoprazoleNHS · UK public medicine informationAccessed 2026-11-04
  5. Prophylaxis of migraine with oral magnesium: results from a prospective, multi-center, placebo-controlled and double-blind randomized studyCephalalgia / PubMed · Randomized placebo-controlled trial abstractAccessed 2026-11-04
  6. Clinical Practice Guideline for the Management of Chronic Insomnia Disorder and Obstructive Sleep ApneaUS Department of Veterans Affairs and Department of Defense · Clinical practice guidelineAccessed 2026-11-04
  7. Medicines containing vitamin B6: safety and scheduling changesAustralian Therapeutic Goods Administration · Regulator safety and scheduling updateAccess checked 2026-11-05 · Source date: 2026-02-19 · 250 neuropathy-related database reports to 31 October 2025; reports are not incidence or proof of causality. Scheduling changes effective 1 June 2027 concern Australian supply.
  8. Heart palpitationsNHS · UK patient guidance, reviewed 2026Accessed 2026-11-04
  9. What to do if someone has a seizure (fit)National Health Service · UK patient guidance on seizure first aidAccess checked 2026-11-06 · Emergency criteria and individual care plans; local emergency numbers differ.