What Does Magnesium Do? Role in the Body and Food Sources
- 2 views
- 0 likes
- 0 comments
- All languages combined

Sign in and earn +31 points by reading this
Read to the end, wait a few seconds, then tap the claim button below.
In short
Magnesium is an essential mineral that helps more than 300 enzyme systems work, supporting energy production, muscle and nerve function, heart rhythm, blood sugar, blood pressure and bone [1][4]. Most people can get it from leafy greens, legumes, nuts, seeds and whole grains [2][3]. Evidence for popular claims about sleep or cramps is limited [5].
Key takeaways
- Magnesium is a cofactor in more than 300 enzyme systems, including those for protein synthesis, muscle and nerve function, blood sugar control and blood pressure regulation [1].
- An adult body holds roughly 25 grams of magnesium, half or more of it in bone and less than 1% in blood serum [1].
- Good food sources include green leafy vegetables, legumes, nuts, seeds and whole grains; refining grains removes much of it [1][2].
- Agencies publish reference intakes that differ by age, sex and country; NHS and NIH figures are not the same [1][3].
- In healthy people, symptoms of deficiency from diet alone are uncommon because the kidneys conserve magnesium [1].
- Research on magnesium for sleep is limited and mostly low quality, and supplements lower blood pressure only slightly [1][5].
- Magnesium from food is not considered harmful, but high amounts from supplements or medicines can cause diarrhoea and interact with some drugs [1][2].
On this page 12 sections
- What does magnesium do?
- What does magnesium do for the body?
- Where is magnesium stored in the body?
- Which foods are high in magnesium?
- How much magnesium do you need?
- What happens if you don’t get enough magnesium?
- What does magnesium do for sleep, blood pressure and migraines?
- Can you get too much magnesium?
- Common mistakes
- Frequently asked questions
- Glossary
- Sources
What does magnesium do?
Magnesium is an essential mineral that helps more than 300 enzyme systems run the body’s chemistry, from turning food into energy to keeping nerves, muscles, the heart and bones working normally [1][4].
The NIH Office of Dietary Supplements (ODS) describes magnesium as an abundant mineral that is naturally present in many foods, added to others, sold as a dietary supplement and found in some medicines such as antacids and laxatives [1]. As an essential mineral, it has to come from what you eat and drink [4].
The UK’s NHS sums up its main jobs simply: magnesium helps turn the food we eat into energy and helps the parathyroid glands, which make hormones important for bone health, work normally [3]. MedlinePlus, the US National Library of Medicine’s health site, adds that it helps keep the heartbeat steady, supports the immune system, helps bones stay strong and helps adjust blood glucose levels [4].
Because magnesium is involved in so many processes, it attracts big claims online, especially about sleep, stress and muscle cramps. This guide separates what health agencies describe as established from what is still being studied.
This guide is general information, not medical advice: questions about your own magnesium intake, test results or any supplement belong with a health professional who knows your situation.
What does magnesium do for the body?
Magnesium works mainly as a helper, or cofactor, for enzymes; without it, reactions that make energy, build proteins and DNA, and move signals along nerves and muscles cannot run properly [1].
ODS lists the main roles [1]:
- Energy: magnesium is required for energy production, including glycolysis and oxidative phosphorylation, the pathways cells use to release energy from food.
- Building blocks: it is needed to make proteins, DNA and RNA, and the antioxidant glutathione.
- Nerves and muscles: it helps move calcium and potassium ions across cell membranes, a process important for nerve impulses, muscle contraction and a normal heart rhythm.
- Blood sugar and blood pressure: enzymes that depend on magnesium take part in blood glucose control and blood pressure regulation.
- Bone: magnesium contributes to the structure of bone.
Bone health is also linked to hormones. ODS notes that magnesium affects the levels of parathyroid hormone and the active form of vitamin D, two major regulators of bone, and that it influences the cells that build and break down bone [1]. The NHS makes the same link through the parathyroid glands [3].
MedlinePlus groups these roles in everyday terms: normal nerve and muscle function, a steady heartbeat, strong bones, a healthy immune system, blood glucose regulation, and the production of energy and protein [4].
None of this means that more magnesium makes these systems work better. The body needs enough, and agencies describe the effects of extra amounts as uncertain or modest [1][2].
Where is magnesium stored in the body?
Most of the body’s magnesium sits in bone and soft tissue; less than 1% is in blood serum, which is why a standard blood test says little about total body stores [1].
According to ODS, an adult body contains approximately 25 grams of magnesium, with 50% to 60% in the bones and most of the rest in soft tissues [1]. Blood levels are kept under tight control, and the kidneys do much of that work: they typically excrete about 120 milligrams of magnesium in urine each day and hold on to more when intake is low [1].
This tight control has two consequences. First, healthy people who eat less magnesium for a while do not usually develop symptoms, because the kidneys reduce losses [1][2]. Second, measuring magnesium is difficult. ODS explains that serum magnesium is the most common test, but serum levels have little correlation with total body magnesium or levels in specific tissues [1].
Other methods exist, including tests on red blood cells, saliva and urine, and a magnesium-loading test, but ODS says no single method is considered satisfactory [1]. A full assessment may need both laboratory tests and a clinical assessment by a professional [1]. That is one reason to be wary of home tests or online quizzes that claim to reveal a hidden magnesium deficiency.
Which foods are high in magnesium?
Magnesium is spread widely through foods: green leafy vegetables, legumes, nuts, seeds and whole grains are the richest everyday sources, and many fortified cereals add more [1][2].
ODS notes that, in general, foods that contain dietary fibre provide magnesium [1]. The NHS names spinach, nuts and wholemeal bread as examples [3], and MedlinePlus says most dietary magnesium comes from dark green, leafy vegetables, with fruits such as bananas, dried apricots and avocados, nuts, legumes, soy products, whole grains and milk also contributing [4].
Processing matters. Refining grains in ways that remove the nutrient-rich germ and bran substantially lowers their magnesium content [1]. White rice, for example, has far less than brown rice, as the table shows. Tap, mineral and bottled waters can also supply magnesium, though the amount varies widely by source and brand [1].
The body does not absorb all of it. ODS says approximately 30% to 40% of the magnesium in food and drinks is typically absorbed [1].
The figures in the table come from the ODS fact sheet, which draws on the US Department of Agriculture’s FoodData Central database [1]. Portions follow US measures, and content varies with variety, growing conditions and preparation, so treat the numbers as a guide to which foods are rich sources rather than exact amounts.
How much magnesium do you need?
Agencies publish reference intakes for magnesium that vary by age, sex and life stage, and they do not all agree; these figures describe the needs of healthy populations, not personal targets [1][3].
In the United States, the Food and Nutrition Board of the National Academies sets Dietary Reference Intakes. Its Recommended Dietary Allowance (RDA) is the average daily intake that meets the needs of nearly all (97% to 98%) healthy people [1][4]. As listed in the ODS fact sheet updated in January 2026, the adult RDAs are 400 to 420 mg a day for men and 310 to 320 mg a day for women, depending on age, with separate values for pregnancy and breastfeeding [1].
The UK uses different reference values. The NHS page on minerals, last reviewed in August 2020, states 300 mg a day for men and 270 mg a day for women aged 19 to 64 [3]. The gap reflects different expert panels and methods, not a disagreement about what magnesium does.
Both agencies stress food first. The NHS says you should be able to get all the magnesium you need from a varied and balanced diet [3]. ODS says that, under the Dietary Guidelines for Americans, nutrients should come mainly from food, with supplements useful only when needs cannot be met through diet [2].
Many people still fall short on paper. An analysis of US survey data from 2013–2016, cited by ODS, found that 48% of Americans of all ages took in less magnesium from food and drinks than the Estimated Average Requirement [1]. Low intake on a survey is not the same as deficiency: ODS stresses that there are no current national data on magnesium status, because blood magnesium is not routinely measured [1].
What happens if you don’t get enough magnesium?
Short periods of low intake usually cause no obvious symptoms, but long-term low intake or losses from illness or medicines can lead to deficiency, with symptoms from fatigue to cramps and abnormal heart rhythms [1][2].
ODS describes the early signs of magnesium deficiency as loss of appetite, nausea, vomiting, fatigue and weakness [1]. As deficiency worsens, numbness, tingling, muscle contractions and cramps, seizures, personality changes, abnormal heart rhythms and coronary spasms can occur [1][4]. Severe deficiency can upset other minerals, causing low blood calcium or low blood potassium [1].
These symptoms are not specific to magnesium, and many have other causes. MedlinePlus points out that although people may not get enough magnesium from their diet, it is rare to be truly lacking in it [4].
ODS identifies groups more likely to have low magnesium [1][2]:
- People with digestive diseases such as Crohn’s disease and coeliac disease, or after bowel surgery, because of poor absorption and losses.
- People with type 2 diabetes, whose kidneys may lose more magnesium in urine.
- People with long-term alcohol dependence, through poor diet, digestive problems and kidney losses.
- Older adults, who tend to eat less magnesium, absorb less and lose more through the kidneys, and are more likely to take medicines that affect it.
Some medicines can lower magnesium too. ODS notes that proton pump inhibitors, a class of acid-reducing drugs, can cause low blood magnesium when taken for long periods, typically more than a year, and that some diuretics can increase magnesium loss [1][2]. Anyone in these groups who is worried should raise it with their clinician rather than self-diagnose.
What does magnesium do for sleep, blood pressure and migraines?
Research on magnesium for sleep, blood pressure, diabetes, bones and migraines is ongoing; agencies describe small or uncertain effects, and say more and better studies are needed [1][5].
Sleep. Magnesium has become popular online as a sleep aid. The National Center for Complementary and Integrative Health (NCCIH) says there is very little research on magnesium supplements for insomnia and other sleep disorders, so there is not enough rigorous evidence to know whether they work [5]. One review of three small studies in older adults suggested magnesium might shorten the time to fall asleep, but the reviewers judged the studies low quality; another review found conflicting results [5]. NCCIH’s wider review of sleep approaches says the evidence for many complementary approaches is inconsistent or too limited to draw conclusions [6].
Blood pressure and the heart. ODS reports that clinical trials suggest supplements lower blood pressure only marginally [1]. Some studies link higher magnesium intake with lower risk of some heart disease and stroke, but it is hard to separate the effect of magnesium from other nutrients in the same foods [2]. In 2022, the US Food and Drug Administration allowed a qualified health claim that diets with adequate magnesium may reduce the risk of high blood pressure, while stating that the evidence is inconsistent and inconclusive [1].
Type 2 diabetes. People with higher magnesium intakes tend to have a lower risk of type 2 diabetes [2]. Trials of supplements in people who already have diabetes are small and conflicting, and ODS notes that the American Diabetes Association finds insufficient evidence for routine use to improve blood sugar control [1].
Bones. Higher intakes are associated with higher bone mineral density, but ODS says more research is needed on whether supplements help prevent or manage osteoporosis [1][2].
Migraine. People with migraines sometimes have low magnesium levels, and small studies suggest supplements may modestly reduce how often migraines occur [2]. ODS reports that US neurology and headache societies consider magnesium probably effective for migraine prevention, but stresses that it should be used for this only under the care of a health care provider [1][2].
Muscle cramps. Cramps are a recognised symptom of real magnesium deficiency [1]. The agency sources used here do not establish that magnesium relieves everyday cramps in people who are not deficient.
Can you get too much magnesium?
Not from food: agencies say magnesium naturally present in food and drinks is not harmful for healthy people, because the kidneys remove the excess. Too much from supplements or medicines is a different matter [1][2].
ODS sets a separate upper limit that applies only to magnesium from supplements and medicines, not food, and advises against going above it unless a health care provider recommends it [2]. High intakes from these sources can cause diarrhoea, nausea and abdominal cramping [1][2]. The NHS likewise warns that high doses can cause diarrhoea and that there is not enough evidence on the effects of high doses over a long time [3].
Very high intakes, usually from magnesium-containing laxatives and antacids, have been linked to magnesium toxicity, which can cause low blood pressure, vomiting, breathing difficulty, irregular heartbeat and cardiac arrest [1][2]. MedlinePlus notes that side effects from high intake are not common except in people with significantly reduced kidney function, who cannot clear the extra [4].
Magnesium also interacts with medicines. ODS gives examples [1][2]:
- Bisphosphonates for osteoporosis are absorbed poorly when taken too close to high-magnesium supplements or medicines.
- Some antibiotics may not be absorbed if taken too soon before or after a magnesium supplement.
- Diuretics can increase or decrease magnesium loss, depending on the type.
- Proton pump inhibitors taken long term can lower blood magnesium.
- Very high doses of zinc supplements can interfere with magnesium absorption.
ODS advises telling your doctor, pharmacist and other providers about all supplements and medicines you take, so they can check for interactions [2].
| Food and portion | Magnesium (mg) |
|---|---|
| Pumpkin seeds, roasted, 1 ounce | 156 |
| Chia seeds, 1 ounce | 111 |
| Almonds, dry roasted, 1 ounce | 80 |
| Spinach, boiled, ½ cup | 78 |
| Cashews, dry roasted, 1 ounce | 74 |
| Soymilk, 1 cup | 61 |
| Black beans, cooked, ½ cup | 60 |
| Brown rice, cooked, ½ cup | 42 |
| Banana, 1 medium | 32 |
| Whole wheat bread, 1 slice | 23 |
| White rice, cooked, ½ cup | 10 |
| Agency (date of page) | Men | Women |
|---|---|---|
| NIH ODS, RDA (January 2026) | 400–420 mg a day | 310–320 mg a day |
| NHS (reviewed August 2020), ages 19–64 | 300 mg a day | 270 mg a day |
| Claim | What agencies report | Evidence |
|---|---|---|
| Better sleep | Very little research; studies small and low quality | Limited |
| Lower blood pressure | Supplements lower it only marginally | Small effect |
| Type 2 diabetes control | Trials small and conflicting | Insufficient |
| Stronger bones | Higher intake linked to higher bone density | Mixed |
| Fewer migraines | May modestly reduce frequency; use only with a provider | Moderate |
| Everyday muscle cramps | Cramps occur in true deficiency; relief not established | Not established |
Common mistakes
Assuming a normal blood test proves your magnesium stores are full.
Fix: Less than 1% of body magnesium is in serum, and serum levels correlate poorly with total stores [1].
Treating every cramp or tired day as magnesium deficiency.
Fix: These symptoms are not specific, and true deficiency is rare in healthy people [1][4].
Thinking more magnesium always works better.
Fix: High amounts from supplements or medicines can cause diarrhoea and, rarely, toxicity [1][2].
Relying on refined grains.
Fix: Refining removes the germ and bran, where much of the magnesium is [1].
Forgetting about medicine interactions.
Fix: Magnesium can affect some antibiotics and osteoporosis drugs; tell your pharmacist what you take [2].
Comparing intake figures across countries as if they were the same.
Fix: NIH and NHS publish different reference intakes [1][3].
Frequently asked questions
What does magnesium do for the body?
It helps more than 300 enzyme systems, supporting energy production, muscle and nerve function, heart rhythm, blood sugar, blood pressure and bone [1].
What does magnesium do for you day to day?
It helps turn food into energy and keeps nerves, muscles and the heartbeat working normally [3][4].
What does magnesium do for sleep?
There is very little rigorous research; small studies are low quality, so it is not known whether supplements help sleep [5].
What does magnesium do for men?
The same as for women; ODS lists higher reference intakes for men and notes men over 70 are among those most likely to have low intakes [1].
Glossary
- Cofactor
- A substance an enzyme needs in order to work; magnesium is one for over 300 enzyme systems [1].
- RDA
- Recommended Dietary Allowance: the average daily intake meeting the needs of nearly all healthy people [1].
- Hypomagnesemia
- A low level of magnesium in the blood [1].
- Serum
- The liquid part of blood used for many laboratory tests [1].
- Proton pump inhibitor
- A type of acid-reducing medicine that can lower magnesium with long-term use [1].
- Parathyroid glands
- Small glands in the neck that make a hormone important for bone [3].
Sources
- Magnesium: Fact Sheet for Health Professionals NIH Office of Dietary Supplements · 2026-01-06
- Magnesium: Fact Sheet for Consumers NIH Office of Dietary Supplements · 2021-03-22
- Others - Vitamins and minerals (magnesium) NHS · 2020-08-03
- Magnesium in diet US National Library of Medicine (MedlinePlus) · 2025-01-21
- In the News: Magnesium Supplements for Sleep Disorders National Center for Complementary and Integrative Health (NIH) · 2024-01-01
- Sleep Disorders and Complementary Health Approaches National Center for Complementary and Integrative Health (NIH) · 2024-05-01
Comments
Top comments