Skip to content

Magnesium: What it Does, How to Get Enough, and When Supplements Make Sense

Magnesium is involved in hundreds of processes throughout the body, from energy production and muscle contraction to nerve signaling, blood sugar regulation, bone health, and normal heart rhythm. But that does not mean every muscle cramp, restless night, or episode of fatigue is caused by magnesium deficiency. Understanding magnesium means looking at the whole balance: how much you consume, how well you absorb it, how much you lose, and whether supplementation actually fits the problem you are trying to solve.

magnesium-rich whole foods
At a Glance
01

Magnesium is essential for energy production, nerve and muscle function, bone, blood pressure regulation, glucose metabolism, and hundreds of enzyme-driven reactions.

02

Low magnesium intake is common, but symptomatic magnesium deficiency from diet alone is uncommon in otherwise healthy people. Gastrointestinal disease, diabetes, medications, alcohol dependence, and increased losses can change that equation.

03

Different magnesium forms have different absorption and gastrointestinal effects, but the internet often exaggerates how precisely each form can be matched to a particular symptom.

Magnesium may be one of the most heavily marketed minerals in the supplement world. Depending on what you read, it is supposed to help you sleep, calm anxiety, stop muscle cramps, improve blood sugar, prevent migraines, regulate your heart, improve energy, fix constipation, and somehow make almost every system in the body work better.

There is a reason magnesium keeps showing up in so many conversations: it really is biologically important. Magnesium participates in hundreds of enzyme-driven reactions and is involved in energy production, muscle contraction, nerve signaling, glucose regulation, blood pressure, bone structure, DNA synthesis, and normal heart rhythm.1

But there is a difference between saying magnesium is necessary for those processes and saying that taking more magnesium will improve every symptom connected to them.

That distinction is where a useful magnesium conversation begins.

The better question is not simply, “Should I take magnesium?” It is, “Am I getting enough, am I absorbing and retaining it, and is magnesium actually relevant to what I am trying to improve?”

What Does Magnesium Actually Do?

Magnesium acts as a cofactor for more than 300 enzyme systems throughout the body. Those reactions help regulate protein synthesis, nerve and muscle function, blood glucose, blood pressure, energy production, DNA and RNA synthesis, and the movement of other electrolytes such as calcium and potassium across cell membranes.1

About half to sixty percent of the magnesium in the adult body is stored in bone. Most of the remainder is found within soft tissues, while less than one percent circulates in the serum.1

That distribution matters because magnesium is not simply another nutrient floating around in the bloodstream. It is deeply integrated into cellular function, which is also one reason assessing magnesium status is more complicated than checking one laboratory number.

Low Magnesium Intake and Magnesium Deficiency Are Not the Same Thing

Many Americans do not consistently consume the recommended amount of magnesium. An analysis of U.S. dietary data cited by the National Institutes of Health found that approximately 48% of Americans consumed less magnesium from food and beverages than their Estimated Average Requirement.1

That does not mean nearly half the country has symptomatic magnesium deficiency.

The body regulates magnesium tightly, and healthy kidneys can reduce urinary magnesium losses when intake falls. As a result, overt symptomatic deficiency caused solely by low dietary intake is uncommon in otherwise healthy people.1

There is an important middle ground, however. Someone can have chronically marginal intake without developing the severe neurological or cardiac findings associated with profound magnesium depletion. And once impaired absorption, increased losses, medications, or health conditions enter the picture, maintaining adequate status can become considerably more difficult.

This is why “you eat less than the RDA” and “you are clinically magnesium deficient” should not be treated as interchangeable statements.

How Much Magnesium Do We Actually Need?

Recommended intake varies with age, sex, and life stage. For most adults, the Recommended Dietary Allowance falls between approximately 310 and 420 milligrams per day. Pregnancy changes requirements as well.1

Those recommendations refer to total magnesium intake from the diet, not a prescription that everyone should take that amount in supplemental magnesium.

That distinction becomes important when looking at supplement labels. If someone already eats a magnesium-rich diet, their supplemental needs may look very different from someone whose diet contains few nuts, seeds, legumes, whole grains, or leafy vegetables.

Food Is Still One of the Best Places to Start

Magnesium is naturally present in a wide variety of foods, particularly plant foods that also provide fiber and other micronutrients. Good sources include pumpkin and chia seeds, almonds, cashews, beans, edamame, whole grains, spinach and other leafy greens.1

For perspective, the NIH lists approximately 156 milligrams in an ounce of roasted pumpkin seeds, 111 milligrams in an ounce of chia seeds, 80 milligrams in an ounce of almonds, 78 milligrams in a half-cup of cooked spinach, and 60 milligrams in a half-cup of black beans.1

That makes magnesium a good example of why diet quality matters beyond individual supplements. Someone regularly eating seeds, nuts, beans, whole grains, vegetables, and other minimally processed foods may accumulate magnesium throughout the day without ever thinking about it.

Highly refined eating patterns can move in the opposite direction. Grain refining, for example, removes nutrient-rich portions of the grain and can substantially reduce its magnesium content.1

Why Might Someone Become Low in Magnesium?

Magnesium status is ultimately a balance between intake, absorption, tissue needs, and losses.

Someone can therefore become depleted for reasons that have very little to do with whether they remembered to take a magnesium capsule that morning.

Gastrointestinal Problems Can Reduce Absorption

Chronic diarrhea and malabsorption can increase magnesium loss. Conditions such as Crohn's disease and celiac disease, along with certain intestinal surgeries, can make it more difficult to maintain magnesium status over time.1

This is one reason a nutrient deficiency should sometimes trigger a second question. Replacing what is missing may be appropriate, but if several nutrients remain low despite reasonable intake, we may also need to understand what is happening within the gastrointestinal system.

Diabetes Can Increase Magnesium Loss

People with insulin resistance and type 2 diabetes can experience increased urinary magnesium losses. Higher glucose concentrations in the kidneys can increase urine output and contribute to magnesium depletion in susceptible individuals.1

That does not mean magnesium supplementation treats diabetes. Clinical trials using magnesium to improve glycemic control have produced mixed results, and routine supplementation specifically for glucose control is not currently supported for people without an underlying deficiency.1

It does mean magnesium status deserves more consideration when the metabolic environment itself may be increasing losses.

Medications Can Matter

Medication history is easy to overlook when discussing nutrients. Long-term use of proton-pump inhibitors can contribute to low magnesium levels in some people, while different types of diuretics can either increase or decrease urinary magnesium losses.1

This is one reason we do not like reducing nutrient questions to diet alone. What someone consumes is only one part of what determines what ultimately remains available to the body.

Age and Alcohol Intake Can Change the Equation

Older adults tend to consume less magnesium than younger adults, while intestinal absorption may decrease and urinary losses may increase with age. Older adults are also more likely to use medications that alter magnesium status.1

Chronic heavy alcohol use can affect magnesium through several pathways at once, including lower nutritional intake, gastrointestinal losses, altered kidney handling, and other metabolic disturbances.

What Does Magnesium Deficiency Actually Feel Like?

This is where magnesium information online often becomes misleading.

Search for “signs you need magnesium” and you may find enormous lists containing anxiety, insomnia, fatigue, constipation, depression, headaches, chocolate cravings, muscle tension, heart palpitations, brain fog, restless legs, and almost anything else a person might experience.

The problem is specificity. Many of those symptoms have dozens of possible explanations.

Recognized early findings in magnesium deficiency can include loss of appetite, nausea, vomiting, fatigue, and weakness. With more significant depletion, numbness, tingling, muscle contractions or cramps, seizures, abnormal heart rhythms, and disturbances in other electrolytes can occur.1

That does not mean someone with fatigue cannot benefit from magnesium. It means fatigue by itself does not diagnose magnesium deficiency.

A symptom can be consistent with low magnesium without being evidence that low magnesium is the reason the symptom exists.

Can a Blood Test Tell You Whether You Need Magnesium?

Magnesium testing is another area where the answer is less clean than we might want.

Serum magnesium is the most widely available laboratory measure, but less than one percent of total body magnesium is located in serum. The NIH notes that serum magnesium correlates poorly with total-body magnesium and magnesium concentrations within specific tissues.1

Other approaches include red-blood-cell magnesium, urinary magnesium, ionized magnesium, and magnesium-loading tests. None is considered a perfect standalone measure of total magnesium status.1

That does not make serum magnesium useless. A clearly abnormal result can be clinically important. It means we should interpret the result alongside dietary intake, gastrointestinal health, medications, kidney function, symptoms, and the larger laboratory picture rather than treating any single test as a direct measurement of every magnesium reserve in the body.

This is part of the broader way we think about laboratory testing in Functional Medicine. Our Functional Ranges vs. Medical Ranges page explains how we look at laboratory values in context rather than relying on a single number in isolation.

What About Magnesium for Sleep?

Sleep is probably one of the most common reasons people start magnesium supplements, and there is enough research here to take the possibility seriously.

A 2024 systematic review of magnesium supplementation for sleep and anxiety found that five of eight studies assessing sleep reported improvement in at least one sleep-related outcome. However, the studies differed considerably in magnesium form, dose, population, duration, and measurement methods, and many were small.2

More recently, a 2025 randomized, placebo-controlled trial enrolled 155 adults who reported poor sleep. Participants receiving magnesium bisglycinate had a statistically greater improvement in insomnia severity over four weeks than the placebo group, although the size of the effect was modest.3

That result is useful because it moves the conversation beyond saying magnesium “relaxes the nervous system” and therefore must help everyone sleep. There is clinical evidence of benefit, but the response is not universal or dramatic.

It also appears plausible that baseline magnesium intake or status matters. In the 2025 trial, exploratory analyses suggested greater improvements among participants reporting lower dietary magnesium intake, although that finding needs confirmation.3

So if someone sleeps poorly, magnesium may be worth considering in the right context. But persistent insomnia still deserves a broader look at circadian rhythm, breathing during sleep, stress, caffeine, medications, hormones, pain, and the other factors capable of disrupting sleep.

What About Magnesium for Anxiety and Stress?

Magnesium is involved in neurological function, and there are biologically plausible ways magnesium status could influence excitatory and inhibitory signaling within the nervous system.

Human clinical evidence is encouraging but less definitive than supplement marketing often suggests. The 2024 systematic review found improvement in at least one anxiety outcome in five of seven included studies, while also emphasizing the small samples and substantial differences among studies.2

That makes “magnesium may help selected people with mild anxiety or stress-related symptoms” a reasonable statement.

“Magnesium deficiency is why you are anxious” is a much bigger claim.

The response itself may still provide useful information. If someone has low dietary magnesium intake and improves meaningfully after that intake is corrected, that is relevant. But we would not use a positive response to magnesium to assume that every underlying driver of anxiety has been identified.

Magnesium and Migraine

Migraine is another area where magnesium has more clinical evidence than many people realize.

A 2024 systematic review and dose-response meta-analysis of randomized trials evaluating several nutritional supplements found that magnesium supplementation reduced migraine attack frequency, severity, and monthly migraine days compared with control conditions, although the authors still called for higher-quality trials.4

A 2025 review of the magnesium-and-migraine literature likewise concluded that several clinical trials support a role for magnesium in migraine prevention or treatment, while emphasizing that results vary between studies and formulations.5

This makes magnesium a reasonable tool to discuss in someone with recurrent migraine, particularly when low magnesium intake or another reason for magnesium depletion is present.

It does not make every headache a magnesium deficiency.

What About Muscle Cramps and Tight Muscles?

Because severe magnesium deficiency can produce muscle contractions and cramps, it is easy to assume that every tight calf or nighttime cramp means magnesium must be low.

That conclusion is too broad.

Muscle cramps can also be influenced by exercise, fatigue, neurological conditions, medications, circulation, pregnancy, hydration and electrolyte changes, and many other factors. Magnesium may be highly relevant in someone who is actually depleted, but the presence of a cramp alone does not identify the cause.

This is another good example of why the clinical pattern matters more than matching a symptom to a supplement chart.

Does Magnesium Lower Blood Pressure or Blood Sugar?

Magnesium participates in both glucose metabolism and blood-pressure regulation, but biological involvement does not automatically translate into a large therapeutic effect from supplementation.

Clinical trials suggest magnesium supplementation can produce a small reduction in blood pressure on average, but the NIH describes the effect as modest and notes that evidence for cardiovascular-disease prevention remains incomplete.1

The diabetes literature is similarly nuanced. Higher magnesium intake is associated with lower type 2 diabetes risk in observational studies, yet trials using supplemental magnesium to improve glycemic control have been small and inconsistent.1

The practical takeaway is not that magnesium is unimportant. It is that correcting inadequate magnesium and using magnesium as a treatment for a complex metabolic disease are two different propositions.

Do You Need a Magnesium Supplement?

Not necessarily.

If someone eats a magnesium-rich diet, has no known reason for increased losses or impaired absorption, and has no clinical reason to suspect inadequate status, adding a supplement simply because magnesium is popular may offer very little.

Supplementation becomes more compelling when there is a clearer reason: chronically poor intake, gastrointestinal loss or malabsorption, medications that affect magnesium, documented low magnesium, or a clinical situation in which magnesium supplementation itself has evidence of benefit.

This is the part of supplementation that often gets skipped. We do not want to begin with a bottle and then search for a reason to use it.

Which Type of Magnesium Should You Take?

This question has become unnecessarily complicated online.

You will often see charts assigning one form of magnesium to sleep, another to anxiety, another to muscle pain, another to the heart, another to energy, and another to the brain. Some of those distinctions have a reasonable biological basis. Others have been stretched far beyond the available human evidence.

The most useful differences usually involve absorption, gastrointestinal effects, elemental magnesium content, and the clinical goal.

Magnesium Citrate

Magnesium citrate is relatively soluble and is among the forms shown to be more bioavailable than magnesium oxide.1 It can also loosen stools because unabsorbed magnesium draws water into the intestine.

That bowel effect may be useful when constipation is part of the reason someone is taking it. For someone already dealing with diarrhea or loose stools, it may be exactly what we do not want.

Magnesium Glycinate or Bisglycinate

Magnesium glycinate has become one of the most popular forms for evening use and is commonly chosen when gastrointestinal tolerance is a priority.

We would be more careful with claims that glycinate is inherently “the magnesium for anxiety” or that the glycine attached to it guarantees better sleep. Comparative clinical research among different forms remains limited.

What we can say is that a 2025 randomized trial specifically using magnesium bisglycinate found a modest improvement in insomnia severity compared with placebo.3

So there is now direct human evidence supporting its use for sleep in at least some people. That is stronger than simply assigning it a specialty because of a biochemical theory.

Magnesium Oxide

Magnesium oxide contains a relatively high proportion of elemental magnesium and is inexpensive, which is why it appears in many supplements.

But studies comparing formulations generally find it less soluble and less bioavailable than forms such as citrate, chloride, lactate, and aspartate.1

Its poorer absorption also contributes to gastrointestinal effects, which can be useful when the intended goal is laxation but less useful when the primary goal is magnesium replacement.

Magnesium L-Threonate

Magnesium L-threonate is often marketed as the “brain magnesium,” usually with claims about cognition, memory, stress, or sleep.

There is interesting emerging human research, but we would not yet call it universally superior for the brain. A 2024 randomized, placebo-controlled trial involving 80 adults with self-reported sleep problems found improvements in several subjective and wearable-derived measures of sleep and daytime functioning after magnesium L-threonate supplementation.6

That is promising. It is still one relatively small trial and does not establish L-threonate as the best magnesium form for every neurological goal.

Magnesium Malate and Magnesium Taurate

Magnesium malate combines magnesium with malic acid, while magnesium taurate combines it with taurine. Both are commonly given very specific roles online—malate for energy or fibromyalgia and taurate for cardiovascular health.

Those claims currently run ahead of the clinical evidence.

There may be reasonable situations in which a clinician prefers one formulation over another, but we would not tell someone that choosing magnesium malate will specifically solve chronic fatigue or that magnesium taurate is proven to target the heart simply because of the molecule attached to the magnesium.

What About Epsom Salt and Topical Magnesium?

Epsom salt contains magnesium sulfate and can certainly make a warm bath enjoyable. That does not mean soaking in it “detoxifies” the body.

Claims that substantial amounts of magnesium are reliably absorbed through intact skin remain much less established than oral magnesium absorption. A bath may help someone relax because it is warm, quiet, and physically soothing without needing to turn it into a detoxification treatment.

If the goal is correcting inadequate magnesium intake, oral food and appropriately selected oral supplementation are much better characterized.

Always Look at Elemental Magnesium

One detail on supplement labels causes a lot of confusion.

A capsule may contain a large amount of a magnesium compound, but the number that matters nutritionally is the amount of elemental magnesium supplied by that compound.

Fortunately, U.S. Supplement Facts panels are supposed to list the amount of elemental magnesium rather than the total weight of magnesium citrate, glycinate, oxide, or another compound.1

This makes comparing two products easier. Do not assume a product containing a larger weight of “magnesium glycinate” automatically gives you more actual magnesium.

More Magnesium Is Not Automatically Better

Magnesium from food is generally safe because healthy kidneys can regulate excess intake effectively. Supplemental magnesium is different.

For adults, the established tolerable upper intake level for magnesium from supplements and medications is 350 milligrams per day unless magnesium is being used under medical supervision. That upper limit does not include magnesium naturally present in food.1

The most common problems from excessive supplemental magnesium are diarrhea, nausea, and abdominal cramping. Very large amounts can become dangerous, particularly when kidney function is impaired because the kidneys are responsible for eliminating much of the excess magnesium.1

This does not mean nobody should ever exceed 350 milligrams therapeutically. It means higher amounts are a different conversation from casually adding another supplement to the cabinet.

Magnesium Can Interact With Medications

Magnesium supplements can interfere with the absorption of some medications. Certain antibiotics and bisphosphonates used for osteoporosis are important examples, which is why timing magnesium around medications can matter.1

The relationship can also run in the opposite direction. Some diuretics and long-term proton-pump-inhibitor therapy can affect magnesium status themselves.

Anyone with kidney disease, significant heart or electrolyte problems, or a complex medication regimen should be particularly cautious about high-dose magnesium supplementation without appropriate guidance.

The Functional Medicine Question Is Bigger Than “Which Magnesium Should I Buy?”

Magnesium is a perfect example of why a systems-based approach to nutrition can be more useful than symptom-to-supplement matching.

If someone appears to need magnesium, we want to understand the context:

  • How much magnesium is actually coming from food?
  • Is the diet broadly nutrient-dense or highly refined?
  • Are diarrhea, inflammatory bowel disease, celiac disease, or other gastrointestinal problems affecting absorption or losses?
  • Are medications affecting magnesium status?
  • Is diabetes or another metabolic condition increasing urinary losses?
  • Is there a laboratory abnormality, and how meaningful is that result in context?
  • What symptom or clinical outcome are we actually trying to improve?
  • Has magnesium already been tried, and was there a reproducible response?
  • Which form best fits the person's digestive tolerance and clinical goal?

That creates a much more individualized decision than giving every tired or stressed patient magnesium glycinate because an infographic says it is the “calming” form.

It also leaves room for supplementation to be genuinely useful. If a patient is not getting enough magnesium, is losing it, has difficulty absorbing it, or has a clinical situation where magnesium has evidence of benefit, correcting that problem can make a meaningful difference.

Food First Does Not Mean Supplements Never Matter

“Get everything from food” and “everyone needs supplements” are two extremes that do not reflect how nutrition works in real people.

Food is an excellent foundation because magnesium-rich foods bring fiber, protein, healthy fats, potassium, phytonutrients, and other nutrients along with the magnesium. But there are situations where food alone may not realistically correct a deficit or produce the therapeutic intake being used for a particular clinical goal.

The question is not whether food or supplements are philosophically better.

The question is what the individual actually needs.

Final Thoughts

Magnesium deserves much of the attention it receives because it is involved in an extraordinary number of physiological processes. But its importance is also what makes it so easy to overinterpret.

Fatigue, poor sleep, headaches, muscle cramps, anxiety, constipation, and metabolic problems can all exist in someone whose magnesium intake deserves attention. They can also occur for reasons that have nothing to do with magnesium.

A thoughtful approach looks beyond a symptom checklist. It considers intake, absorption, gastrointestinal function, medications, losses, laboratory findings, the reason supplementation is being considered, and what happens when the intervention is actually tried.

Magnesium can be an important part of the answer without automatically being the answer to everything.

If symptoms, nutrient deficiencies, digestive problems, or an unusual response to supplementation suggest there may be a larger pattern involved, a personalized Functional Medicine evaluation can help determine what deserves investigation rather than simply adding another supplement.

Sources & References

1. National Institutes of Health, Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals. Updated 2026.

2. Rawji A, Peltier MR, Mourtzanakis K, et al. Examining the Effects of Supplemental Magnesium on Self-Reported Anxiety and Sleep Quality: A Systematic Review. Cureus. 2024.

3. Schuster J, Cycelskij I, Lopresti A, Hahn A. Magnesium Bisglycinate Supplementation in Healthy Adults Reporting Poor Sleep: A Randomized, Placebo-Controlled Trial. Nature and Science of Sleep. 2025.

4. Effects of Selected Dietary Supplements on Migraine Prophylaxis: A Systematic Review and Dose-Response Meta-Analysis of Randomized Controlled Trials. Neurological Sciences. 2024.

5. Dominguez LJ, Veronese N, Sabico S, Al-Daghri NM, Barbagallo M. Magnesium and Migraine. Nutrients. 2025.

6. Hausenblas HA, Lynch T, Hooper S, et al. Magnesium-L-Threonate Improves Sleep Quality and Daytime Functioning in Adults With Self-Reported Sleep Problems: A Randomized Controlled Trial. Sleep Medicine: X. 2024.

COMPLIMENTARY DISCOVERY CALL

Not Sure Where to Start?

$0 / 15 minutes
No pressure. No commitment.
✓
Share what’s been going on

Talk through your symptoms, concerns, health history, and goals.

✓
Learn how our approach works

See how Functional Medicine looks at the bigger picture behind your health.

✓
See if Functional Medicine is a good fit

Find out whether our approach makes sense for what you're experiencing.

✓
Understand what comes next

If we're a match, we'll explain the next step for moving forward.

★★★★★

“I have FINALLY found the answers.”

— Katie G.

★★★★★

“My health has drastically improved in just a few months.”

— Sophia S.

★★★★★

“Every single day I feel better and better.”

— Jessica N.

Scroll To Top