Magnesium: Needs, Food Sources, and the Evidence on Sleep and Cramps

Magnesium has become one of the most talked-about supplements, recommended online for sleep, cramps, stress and almost everything else. The research is far more cautious. Here is what the official bodies and the trials actually say.
What magnesium does
Magnesium is involved in more than 300 enzyme systems. It is needed for energy production, protein synthesis, muscle and nerve function, blood glucose control and blood pressure regulation, and it contributes to the structure of bone. An adult body contains roughly 25 g of magnesium, about half to two-thirds of it in bone. Less than 1% is in the blood, which is why a normal blood test does not always reflect total body stores.
Reference intakes
| Body | Men | Women |
|---|---|---|
| US National Academies (NIH ODS) | RDA 400 mg (19–30), 420 mg (31+) | 310 mg (19–30), 320 mg (31+); pregnancy 350–360 mg |
| EFSA (EU, 2015) | Adequate intake 350 mg | 300 mg |
| UK reference nutrient intake | 300 mg | 270 mg |
Upper limit. The US tolerable upper intake level for adults is 350 mg a day, but it applies only to magnesium from supplements and medicines, not to magnesium in food. The NHS similarly says that taking 400 mg or less a day from supplements is unlikely to cause harm. EFSA set an upper limit of 250 mg a day for supplemental magnesium (readily dissociable salts and compounds such as magnesium oxide) in adults. The limits exist mainly because supplemental magnesium causes diarrhoea.
Food sources
Magnesium is widespread in plant foods: green leafy vegetables such as spinach, nuts (almonds, cashews), seeds (pumpkin, chia), pulses, wholegrains, brown rice and wholemeal bread, as well as some fish, dairy products and potatoes. Refining grains removes much of the magnesium, so diets based on white flour and processed foods tend to be lower. Hard tap water can also contribute.
Who is at risk of low magnesium
True magnesium deficiency is uncommon in healthy people because the kidneys reduce urinary losses when intake is low. Low levels are more likely in:
- people with gastrointestinal diseases causing chronic diarrhoea or malabsorption (Crohn's disease, coeliac disease) or after bowel surgery;
- people with type 2 diabetes, especially when poorly controlled, because of increased urinary losses;
- people with alcohol dependence;
- older adults, whose intake and absorption tend to fall;
- people taking certain medicines long term. The US Food and Drug Administration warned in 2011 that prolonged use of proton pump inhibitors (generally over a year) can cause low blood magnesium. Some diuretics also increase magnesium losses.
Severe deficiency causes loss of appetite, nausea, fatigue, muscle cramps, tremor, numbness, abnormal heart rhythms and seizures, and often occurs together with low calcium and potassium. It is a medical problem diagnosed with blood tests and treated by clinicians, sometimes with intravenous magnesium.
What the trials show
Muscle cramps
A Cochrane review (Garrison et al., 2020) examined magnesium for skeletal muscle cramps. It concluded that magnesium supplementation is unlikely to provide clinically meaningful cramp prevention for older adults with ordinary (idiopathic) night cramps. Evidence for cramps in pregnancy was conflicting and of low certainty, and too limited to draw conclusions for other groups.
Blood pressure
Meta-analyses of randomised trials report small reductions in blood pressure with magnesium supplements. One analysis of 34 trials (Zhang et al., Hypertension 2016) found that a median of 368 mg a day for a median of three months lowered systolic blood pressure by about 2 mmHg and diastolic by about 1.8 mmHg. These effects are modest, the trials varied widely, and magnesium is not a substitute for prescribed blood pressure treatment.
Sleep and anxiety
This is where marketing has run furthest ahead of the evidence. Systematic reviews of magnesium for insomnia have found only a few small trials, mostly in older adults, with low-quality evidence and inconsistent results. Reviews of magnesium for anxiety reach similar conclusions: the data are too limited to show a reliable benefit. Claims that magnesium "fixes" sleep or stress are not supported by good trials.
Migraine
Some headache guidelines list magnesium as an option that may help prevent migraine, based on limited trial evidence. Anyone with migraine should discuss prevention options with a doctor.
Forms and side effects
Supplements contain magnesium bound to different compounds (oxide, citrate, glycinate, chloride and others), which differ in how well they are absorbed and how likely they are to cause diarrhoea. Magnesium-containing laxatives and antacids can deliver large amounts. Doses above the upper limit commonly cause diarrhoea, nausea and abdominal cramps. Very high intakes, usually from laxatives or antacids, can cause magnesium toxicity, with low blood pressure, muscle weakness, breathing difficulty and irregular heartbeat. The risk is much higher in people with kidney disease, who cannot excrete excess magnesium and should not take magnesium supplements without medical advice.
Magnesium can reduce the absorption of some medicines, including bisphosphonates for osteoporosis and tetracycline and quinolone antibiotics, so doses usually need to be separated.
In short
- Adult reference intakes range from 270–300 mg (UK) to 300–350 mg (EFSA) and 310–420 mg (US) a day; food sources are plentiful.
- The supplement upper limit is 350 mg a day in the US (EFSA: 250 mg); food magnesium does not count towards it.
- Evidence does not show a meaningful benefit for night cramps in older adults; benefits for sleep and anxiety are unproven.
- People with kidney disease or on interacting medicines should take advice before using magnesium.
This page is general information, not medical advice. Check with a doctor or pharmacist before taking magnesium if you have kidney problems or take other medicines.
Sources
- NIH Office of Dietary Supplements, Magnesium fact sheet for health professionals.
- NHS, Vitamins and minerals: others (including magnesium).
- Garrison SR et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev 2020.
- Zhang X et al. Effects of magnesium supplementation on blood pressure: a meta-analysis of randomized double-blind placebo-controlled trials. Hypertension 2016;68(2):324–333.
- US Food and Drug Administration, Drug Safety Communication: low magnesium levels can be associated with long-term use of proton pump inhibitor drugs (2011).
- EFSA, Dietary reference values finder.
SleepHow much sleep adults need
Not one magic number but a range: what sleep societies, the CDC and the NHS recommend.
NutritionUpper limits: when supplements can harm
What tolerable upper intake levels are, the nutrients most often taken in excess, and drug interactions.
NutritionHow to choose a multivitamin
Label reading, upper limits, iron and vitamin A, independent testing marks. No brands.