What Does Magnesium Actually Do in Your Body?

Last updated: 27 July 2026 · Educational guide. Intake figures come from the National Institutes of Health Office of Dietary Supplements.
Magnesium is having a moment. It is in sleep drinks, recovery powders and half the wellness videos on your feed. What almost nobody explains is what the mineral is actually doing in there.
The short answer: magnesium is a helper molecule your body uses in more than 300 enzyme reactions. It is required to turn food into usable energy, to let muscles relax after they contract, to build bone, to steady nerve signalling, and to activate vitamin D. You do not notice it working. You notice when there is not enough.
This guide explains what magnesium does, where your body keeps it, why a blood test can look normal while your stores are running down, and how to tell whether food is covering you.
Key Takeaways
- Magnesium is a cofactor in over 300 enzyme systems, which is why its symptoms are vague rather than specific.
- Roughly half to sixty percent of the magnesium in your body is locked in bone, and only about one percent circulates in blood.
- A normal blood magnesium result does not rule out low stores, because your body raids bone to keep blood levels steady.
- Adults need roughly 310 to 420 mg a day. Around 48 percent of Americans take in less than the estimated average requirement from food.
- Calcium makes muscles contract. Magnesium is part of what lets them let go again.
- Food comes first. A handful of pumpkin seeds delivers more magnesium than most supplement capsules.
What magnesium actually does
Magnesium is not a vitamin and it is not a stimulant. It is a mineral that acts as a cofactor, which means enzymes cannot do their jobs without it sitting in place. Take it away and a very long list of ordinary processes gets slower and sloppier.
It makes your energy usable
Your cells run on a molecule called ATP. Here is the detail that surprises people: ATP is biologically inactive unless it is bound to magnesium. The usable form is magnesium ATP. So magnesium is not a source of energy in the way calories are. It is the thing that makes the energy you already have available to spend.
That is a large part of why low magnesium shows up as fatigue that sleep does not fix.
It lets muscles relax
Muscle movement is a partnership. Calcium flows into muscle cells and drives contraction. Magnesium helps push calcium back out so the muscle can release.
When magnesium is short, that release is less efficient. This is the mechanism behind the classic symptoms: night cramps, eyelid twitches, restless legs, and the feeling of being physically wound up when nothing has happened.
It steadies nerve signalling
Magnesium sits on a receptor in the brain called the NMDA receptor and acts as a gatekeeper, blocking it from firing too easily. It also supports GABA, the main calming signal in the nervous system.
Low magnesium means that gate opens more readily. In plain terms, the nervous system becomes easier to excite and harder to settle. That is the honest mechanistic basis for magnesium's reputation for calm, and it is why the effect is subtle rather than sedative.
It builds bone
Between half and sixty percent of your body's magnesium is stored in bone, where it contributes to the crystal structure alongside calcium and phosphorus. Bone is also the reserve tank. When intake falls short, your body withdraws magnesium from bone to keep blood levels stable, which is exactly why blood tests can look reassuring while stores quietly decline.
It helps regulate blood sugar and blood pressure
Magnesium is involved in how insulin signals to cells and in how blood vessels relax and constrict. This is well established physiology rather than a supplement claim, and it is one reason magnesium intake keeps appearing in large observational studies of metabolic and cardiovascular health.
It activates vitamin D
This one is underappreciated. Vitamin D from sun or supplements is inactive. It has to be converted twice, in the liver and kidney, and the enzymes doing that conversion require magnesium. If magnesium is low, taking more vitamin D may not achieve as much as you expect. The two nutrients work as a pair.
It builds proteins and repairs DNA
Magnesium is required for synthesising protein and for the enzymes that copy and repair DNA. Not something you feel day to day, but it is the reason magnesium is described as essential rather than optional.
Where your body keeps it, and why blood tests mislead
This is the single most useful thing to understand about magnesium.
| Where it sits | Roughly how much | What that means |
|---|---|---|
| Bone | 50 to 60 percent | The reserve tank your body draws on |
| Soft tissue and muscle | Most of the remainder | Where the work happens |
| Blood | About 1 percent | The only part a standard test measures |
Your body defends that one percent tightly. If dietary intake drops, it pulls magnesium out of bone to keep blood concentration in range. The NIH states plainly that serum magnesium does not accurately reflect total body magnesium or the amount inside tissues.
The practical consequence: a normal blood magnesium result is genuinely reassuring about acute problems and tells you very little about whether you have been slowly running down for years.
How much do you need?
Recommended intakes from the NIH Office of Dietary Supplements, covering food and supplements combined:
| Group | Daily recommendation |
|---|---|
| Men 19 to 30 | 400 mg |
| Men 31 and over | 420 mg |
| Women 19 to 30 | 310 mg |
| Women 31 and over | 320 mg |
| Pregnancy | 350 to 400 mg |
The 350 mg number people misread
You will see 350 mg quoted as an upper limit. It applies to magnesium from supplements and fortified foods only. It does not apply to magnesium naturally present in food. Healthy kidneys clear dietary magnesium efficiently, so a plate of spinach and pumpkin seeds is not counted against it. The supplemental limit exists because a large dose arriving in the gut at once causes loose stools, not because magnesium is dangerous at normal intakes.
Are people actually short of it?
Roughly 48 percent of Americans take in less than the estimated average requirement from food and drink, based on national survey data.
Be careful with how that figure is usually reported. It measures inadequate intake, not diagnosed deficiency. Those are different things, and almost every supplement advert conflates them. Plenty of people with intake below the target are perfectly fine.
Two reasons intake has drifted down. Modern diets lean heavily on refined grains, and refining strips most of the magnesium out. And magnesium levels in some crops have fallen alongside changes in soil and farming practice.
Signs associated with low magnesium
These are non specific, which is precisely the problem. Any of them can have a dozen other causes.
- Muscle cramps, especially at night, and eyelid twitching
- Fatigue that rest does not resolve
- Feeling wired, tense or unable to settle in the evening
- Poor sleep quality
- Headaches
- Low appetite or nausea
Do not self diagnose from a symptom list. What this list is useful for is deciding whether it is worth looking at your actual food intake for a week.
What drains magnesium
Intake is only half the equation. Several common things increase how much you lose.
- Certain medications. Long term use of proton pump inhibitors is associated with low magnesium, and loop and thiazide diuretics increase losses through urine.
- Alcohol. Heavy intake increases urinary excretion.
- Digestive conditions. Crohn's disease, coeliac disease and chronic diarrhoea all reduce absorption.
- Type 2 diabetes. Higher blood glucose increases urinary magnesium loss.
- Heavy sweating. Relevant for endurance athletes and hot climates.
- Age. Absorption tends to decline and urinary losses tend to rise.
Food first, and it is easier than people think
Magnesium sits in seeds, nuts, legumes, whole grains and leafy greens. Chlorophyll is built around a magnesium atom, which is why green plants are a reliable source.
| Food | Serving | Magnesium |
|---|---|---|
| Pumpkin seeds | 1 oz | 156 mg |
| Chia seeds | 1 oz | 111 mg |
| Almonds | 1 oz | 80 mg |
| Spinach, boiled | half cup | 78 mg |
| Cashews | 1 oz | 74 mg |
| Dark chocolate, 70 to 85 percent | 1 oz | 65 mg |
| Black beans | half cup | 60 mg |
| Edamame | half cup | 50 mg |
| Avocado | 1 cup, cubed | 44 mg |
| Brown rice | half cup | 42 mg |
| Banana | 1 medium | 32 mg |
Notice the top row. A single ounce of pumpkin seeds delivers more magnesium than most supplement capsules contain. Add pumpkin seeds to breakfast, a handful of almonds in the afternoon and a serving of beans or greens at dinner and you are most of the way there without buying anything.
So when does a supplement make sense?
Honestly, not for everyone. A supplement is worth considering if your diet is genuinely light on seeds, nuts, legumes and greens and you are not going to change that, if you take a medication that increases losses, if you have a condition affecting absorption, or if you have symptoms that fit and you want to test a change methodically.
If you do supplement, two things determine whether it works. The form, because some are gentle and some send you to the bathroom, and the elemental amount, which is almost never the big number on the front of the bottle. Both are covered in our guide to magnesium glycinate versus citrate, and the evidence on sleep specifically is in the best magnesium for sleep. If you want the general skill, read how to read a supplement label.
Set expectations properly. Magnesium works by refilling stores, not by acting on you in the moment. Four weeks of consistent use is the fair point to judge it.
Frequently asked questions
What does magnesium do in the body?
Magnesium is a cofactor in more than 300 enzyme reactions. It makes ATP usable so your cells can spend energy, allows muscles to relax after contracting, steadies nerve signalling, forms part of bone structure, and is required to activate vitamin D. Because it does so many jobs, low levels produce vague symptoms rather than one clear sign.
Can a blood test tell me if I am low in magnesium?
Only partly. Just one percent of your body's magnesium is in blood, and your body pulls magnesium from bone to keep that level steady. The NIH states that serum magnesium does not accurately reflect total body stores, so a normal result rules out acute problems but not gradual depletion.
What are the signs of low magnesium?
Common associations include night cramps, eyelid twitching, fatigue that rest does not fix, feeling wired in the evening, poor sleep and headaches. All of these have many other possible causes, so treat them as a prompt to review your diet rather than as a diagnosis.
How much magnesium do I need a day?
Roughly 310 to 320 mg for adult women and 400 to 420 mg for adult men, from food and supplements combined. Separately, there is a 350 mg upper limit that applies only to magnesium from supplements and fortified foods, not to magnesium naturally present in food.
Which foods are highest in magnesium?
Pumpkin seeds lead by a distance at about 156 mg per ounce. Chia seeds, almonds, cashews, spinach, black beans, edamame and dark chocolate are all strong sources. Chlorophyll is built around a magnesium atom, which is why leafy greens reliably contain it.
Does magnesium help you relax?
There is a plausible mechanism. Magnesium blocks the NMDA receptor from firing too easily and supports GABA, the nervous system's main calming signal. That makes it a support for relaxation rather than a sedative, and any effect builds over weeks rather than arriving within an hour.
Can you get too much magnesium?
From food, essentially no, because healthy kidneys clear the excess. From supplements, yes. Large single doses cause loose stools and cramping, which is what the 350 mg supplemental limit is designed to prevent. People with reduced kidney function are the important exception and should not supplement without medical guidance.
Does magnesium affect vitamin D?
Yes. Vitamin D is inactive until it is converted in the liver and kidney, and the enzymes performing those conversions require magnesium. If magnesium is low, a vitamin D supplement may not achieve what you expect. The two work together.
The bottom line
Magnesium is not a wellness trend. It is a piece of basic machinery that sits inside hundreds of reactions you never think about, which is exactly why running low feels like nothing in particular and everything slightly off.
The most useful facts are these. Your blood test cannot see most of it. Refined food has less of it than whole food. And a single ounce of pumpkin seeds beats most capsules.
Start there. Look at what you actually ate this week and count the seeds, nuts, beans and greens. If the answer is close to none, you have learned something more useful than any supplement label could tell you.
About this guide. Written by the Peremis Editorial Team. Intake recommendations and food composition figures come from the National Institutes of Health Office of Dietary Supplements. This is an educational article rather than a product guide, and we would rather you fixed this with food if you can.
These statements have not been evaluated by the Food and Drug Administration. This article is for educational purposes only and is not intended to diagnose, treat, cure, or prevent any disease. Always consult a licensed healthcare provider before starting a new supplement, especially if you are pregnant, nursing, taking medication, or have a kidney condition.
