Magnesium: What It Does, How Much You Need, and Where to Get It
A look at the mineral behind hundreds of body processes, from sleep to muscle function.
Want to see how much magnesium you actually get? Track it free with Ration →
Key takeaways
- Magnesium supports muscle, nerve, blood sugar, and bone function throughout the body
- Many people fall short of recommended intakes, though severe deficiency is rare
- Leafy greens, nuts, seeds, legumes, and whole grains are reliable food sources
- Supplements come in many forms; some absorb better and cause less stomach upset than others
What is magnesium?
Magnesium is an essential mineral, meaning the body cannot make it and needs a steady supply from food or supplements.
It works as a cofactor for hundreds of enzymes involved in energy production, protein synthesis, and DNA repair.
Most of the body's magnesium is stored in bone and soft tissue, with only a small fraction circulating in blood.
What does magnesium do in the body?
Magnesium helps regulate muscle contraction and nerve signaling, working alongside calcium and potassium to keep those systems balanced.
It also plays a role in blood sugar control, blood pressure regulation, and the structural development of bone.
Because it touches so many systems, low magnesium status has been studied in relation to a wide range of conditions.
- Muscle and nerve function
- Heart rhythm regulation
- Blood sugar metabolism
- Blood pressure regulation
- Bone structure and density
- Protein and DNA synthesis
What happens if you don't get enough?
Mild, ongoing shortfalls are more common than a diagnosed deficiency, especially among people who eat few vegetables, legumes, or whole grains.
Early signs some people report include muscle cramps, fatigue, and irritability, though these symptoms overlap with many other causes.
More pronounced deficiency, which is uncommon in otherwise healthy people, can affect heart rhythm and nerve function.
- Older adults, who absorb magnesium less efficiently
- People with type 2 diabetes
- People with digestive conditions like Crohn's disease or celiac disease
- People who use certain diuretics or proton pump inhibitors long term
- People with alcohol use disorder
Where does magnesium come from in food?
Magnesium is widespread in plant foods, particularly anything grown in mineral-rich soil, along with nuts, seeds, and legumes.
Whole grains keep more magnesium than refined grains, since much of it is lost in processing.
Dark leafy greens like spinach, along with almonds, pumpkin seeds, black beans, and avocado, are all reliable everyday sources.
Does magnesium help you sleep?
Magnesium is popularly marketed as a sleep aid, and its role in calming nerve activity gives this idea some biological plausibility.
That said, the evidence specifically for magnesium supplements improving sleep quality in the general population remains limited and mixed, and much of the enthusiasm outpaces the data currently available.
People considering magnesium for sleep should treat it as an open question rather than a settled fix.
How much magnesium do you need?
Recommended intakes vary by age and sex, generally landing higher for adult men than for adult women.
- Adult men: around 400 to 420 mg per day
- Adult women: around 310 to 320 mg per day
- Pregnancy: slightly higher than baseline female needs
- Needs are typically met through a varied diet with plants, nuts, and whole grains
What forms do magnesium supplements come in?
Magnesium supplements are sold bound to different compounds, and the form can affect absorption and tolerability.
- Magnesium citrate, generally well absorbed and commonly used
- Magnesium glycinate, often chosen for being gentler on the stomach
- Magnesium oxide, less well absorbed but widely available and inexpensive
- Magnesium chloride, found in some topical and oral products
- Magnesium malate and magnesium threonate, marketed for specific uses though evidence is more limited
Is magnesium safe?
Magnesium from food sources carries no known risk of toxicity in healthy people, since the kidneys clear excess amounts.
Supplemental magnesium, particularly at high doses, can cause diarrhea, nausea, and abdominal cramping, since unabsorbed magnesium draws water into the intestines.
People with reduced kidney function are at higher risk of magnesium buildup and should be more cautious with supplements.
- Common: loose stools or diarrhea at higher doses
- Less common: nausea or stomach cramping
- Rare, mainly in kidney disease: magnesium toxicity affecting heart rhythm and blood pressure
- Possible interactions with certain antibiotics and diuretics
The bottom line
Magnesium is a workhorse mineral involved in muscle function, nerve signaling, blood sugar control, and bone health.
A varied diet rich in leafy greens, nuts, seeds, legumes, and whole grains covers most people's needs without any supplement.
For specific claims like better sleep or fewer muscle cramps, it is fair to stay curious but not oversold, since the research is still developing.
Frequently asked questions
What are the best food sources of magnesium?
Leafy greens, nuts, seeds, legumes, whole grains, and avocado are among the most concentrated everyday sources.
Can magnesium supplements help with sleep?
Some people report better sleep with magnesium, but current evidence for the general population is limited and mixed, so it should not be treated as a proven fix.
Who is most likely to be low in magnesium?
Older adults, people with digestive conditions, people with type 2 diabetes, and those on certain long-term medications are at higher risk of falling short.
What is the difference between magnesium citrate and magnesium glycinate?
Magnesium citrate is well absorbed and commonly used, while magnesium glycinate is often chosen by people looking for a gentler effect on the stomach.
Can you take too much magnesium?
Excess magnesium from food is not a concern for healthy people, but high-dose supplements can cause diarrhea and, in rare cases involving kidney disease, more serious effects.