Nutrition

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

Nutrition · Published 2026-10-24

Peanuts, walnuts and pistachios on a round wooden board
Mixed nuts on a wooden board.

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

BodyMenWomen
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 mg300 mg
UK reference nutrient intake300 mg270 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:

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

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