Magnesium Explained: What It Does and Signs You Might Need More

Magnesium explained simply: what this mineral does for sleep, muscles and mood, signs of low magnesium, and the best food sources to get more.

Last updated: October 27, 2026

Magnesium has quietly become one of the most talked-about minerals in wellness circles, and for once the hype has a solid foundation. It is involved in more than 300 biochemical reactions in your body — everything from muscle function to sleep quality to keeping your heartbeat steady. Yet studies suggest a large share of adults do not get enough of it.

The tricky part is that magnesium deficiency rarely announces itself loudly. It shows up as a collection of small annoyances: restless sleep, eyelid twitches, muscle cramps, a short fuse. This guide explains what magnesium actually does, how to tell if you might be low, and how to get more of it without overcomplicating your life.

What Magnesium Does in Your Body

Think of magnesium as a behind-the-scenes multitasker. Some of its biggest jobs:

  • Muscle function: Magnesium helps muscles relax after they contract. Cramps and twitches can occur when intake is very low — but they are non-specific symptoms with many other causes, including dehydration, overuse, and electrolyte shifts.
  • Sleep quality: It plays a role in regulating melatonin and calming the nervous system. Some observational studies link higher magnesium intake with self-reported better sleep quality, but clinical trial evidence is mixed — magnesium is not a proven sleep treatment.
  • Stress response: Magnesium is involved in cortisol regulation and the calming branch of the nervous system. Some researchers have proposed that chronic stress may lower magnesium levels, but this cycle is a hypothesis — not an established fact.
  • Heart and blood sugar: It helps maintain a normal heart rhythm and plays a role in how your body handles insulin and blood sugar.

None of this makes magnesium a miracle mineral. It makes it a foundational one — the kind of nutrient where being low causes a dozen small problems, and being sufficient just lets everything run quietly in the background.

7 Signs You Might Be Low on Magnesium

Magnesium status is hard to assess: most of the body’s magnesium is stored inside cells and bone, and the NIH notes that blood (serum) levels do not reliably reflect total body magnesium. The signs below are possible but non-specific — each has many other causes, and no symptom or pattern of symptoms can diagnose a deficiency on its own. If several persist, see a healthcare professional rather than self-diagnosing:

1. Muscle cramps and twitches

A commonly cited sign. Nighttime calf cramps, a twitching eyelid, or restless legs in the evening can relate to magnesium’s role in muscle relaxation — but these are non-specific symptoms with many causes. They suggest, not prove, low magnesium.

2. Trouble falling or staying asleep

If your mind races at bedtime or you wake frequently, low magnesium is one of many possible contributors — alongside stress, screen time, caffeine, and sleep disorders. Do not assume a supplement will fix poor sleep without addressing the likelier causes first.

3. Feeling anxious or on edge

Magnesium plays a role in regulating the stress response. Feeling on edge has many possible causes — poor sleep, caffeine, life stress — and while low magnesium is sometimes discussed as one factor, it is neither the most common cause nor a diagnosis.

4. Low energy and fatigue

Magnesium is required to produce ATP, the energy currency of your cells. Persistent tiredness that sleep does not fix is worth investigating from the nutrition angle.

5. Frequent headaches

Some research links low magnesium to more frequent migraines and tension headaches. It is one reason magnesium is sometimes suggested for headache-prone people.

6. Chocolate cravings

This one is folk wisdom, not evidence. Cocoa is genuinely rich in magnesium, but there is no reliable scientific evidence that chocolate cravings indicate a magnesium deficiency. Cravings are driven by habit, stress, taste preference, and many other factors.

7. Numbness or tingling

Pins and needles in hands or feet, without an obvious cause like sleeping on your arm, can reflect nerve excitability tied to low magnesium. If this persists, see a doctor — it has several possible causes.

The Best Food Sources of Magnesium

Supplements get the attention, but food comes first. Magnesium-rich foods are mostly delicious:

  • Pumpkin seeds — about 150 mg per ounce, one of the richest sources there is
  • Dark chocolate (70%+) — around 65 mg per ounce, and yes, this counts
  • Almonds, cashews, and peanuts — a small handful covers a meaningful chunk
  • Black beans and lentils — fiber plus magnesium in one package
  • Bananas and avocados — easy everyday additions
  • Leafy greens — spinach and Swiss chard are standouts
  • Whole grains — brown rice, oats, and whole wheat

Per the NIH Office of Dietary Supplements, the recommended dietary allowance (RDA) for adults is 400–420 mg per day for men and 310–320 mg per day for women, depending on age. A day that includes oatmeal with banana at breakfast, a handful of almonds as a snack, and lentils or beans at dinner gets you most of the way there without thinking about it.

What About Magnesium Supplements?

Supplements make sense in specific cases: persistent cramps, a diet low in the foods above, or a doctor's recommendation. If you go that route, a few things matter:

  • Form matters, modestly. The NIH notes that forms which dissolve well in liquid — citrate, lactate, chloride, and aspartate — tend to be absorbed more completely than magnesium oxide or sulfate. The practical difference between common forms is modest, however, and “glycinate” has limited head-to-head human evidence behind its marketing claims. Do not pay a large premium for a form without a reason.
  • Timing. Many people take magnesium in the evening hoping it helps sleep, but there is no strong evidence that time of day meaningfully changes its effect. Taking it consistently — with or without food, as tolerated — matters more than the clock.
  • Dose matters — know the upper limit. The NIH sets the tolerable upper intake level for supplemental magnesium at 350 mg per day for adults. Crucially, this limit applies only to magnesium from supplements and magnesium-containing medicines — there is no upper limit for magnesium naturally present in food. Do not exceed 350 mg/day from supplements unless a healthcare professional advises otherwise. Above that, diarrhea, nausea, and abdominal cramping are common; extremely high intakes can cause irregular heartbeat.

Magnesium can also interact with certain medications, including some antibiotics and blood pressure drugs. If you take prescription medication, check with your doctor or pharmacist before supplementing.

The Bottom Line

Magnesium is one of those nutrients where the basics beat the biohacking. Eat pumpkin seeds, nuts, beans, leafy greens, and dark chocolate regularly, and most people cover their needs without a single pill. If cramps, twitches, or restless sleep persist despite a decent diet, a well-chosen supplement — or a conversation with your doctor — is a reasonable next step.

Disclaimer: This article is general information only and is not medical advice. Talk to a healthcare professional before starting supplements, especially if you take medication or have kidney issues.

This article is for informational purposes only and is not medical advice. Please consult a qualified healthcare professional for personalized guidance.

FAQ

Evidence suggests it can, particularly for people who are low to begin with. It supports melatonin regulation and calms nervous system activity. It is not a sedative — expect subtly better sleep over weeks, not knocked-out drowsiness on night one.

For general use, magnesium glycinate (gentle, good for sleep and anxiety) or magnesium citrate (well absorbed, can help mild constipation too). Avoid magnesium oxide for supplementation — most of it passes straight through.

Practically no. Your kidneys efficiently clear excess magnesium from food. Toxicity is almost exclusively a supplement problem, which is why megadosing pills — not eating almonds — is the thing to be careful about.