Magnesium is required for so many functions

A white flower with yellow center on blue background.

If you had to nominate an MVP mineral, it would be magnesium. Like potassium, sodium, and calciummagnesium is an electrolyte, important for muscle function, cardiovascular health, and, since it’s stored in your bones, skeleton strength, says Olivia Wagner, RDN, an integrative registered dietitian nutritionist in Chicago.

Because magnesium is required for so many functions — more than 300, notes the National Institutes of Health (NIH) â€” there are long-term consequences for your health not just when you’re deficient, but when you have a low-grade chronic insufficiency, says Robin Foroutan, MS, RDN, who specializes in integrative and functional medicine at The Morrison Center in New York City. (1)

“This is called the ‘triage hypothesis,’ which is the idea that your body needs all these vitamins and minerals to function optimally. When it doesn’t get enough of these nutrients, it has to prioritize those it will shuttle its resources to, which will be the ones that keep us alive and allow us to procreate,†she says. If you’re running low on these nutrients, your body will redirect resources away from longevity, healthy aging, and repair. Because magnesium is so important, falling short can affect your body in a number of ways.

The following are the recommended dietary allowances (RDA) for magnesium, as suggested by the NIH: (1)

Ages 19–30

Men: 400 milligrams (mg)

Women: 310 mg

Ages 31 and Older

Men: 420 mg

Women: 320 mg

Health Conditions Magnesium May Prevent or Manage

As a do-it-all mineral, magnesium can have a hand in addressing several health conditions. “Magnesium plays a role in a number of different body functions. I find that people’s [health is] better when they have more in their diet from foods or supplements,†says Wagner. Here’s how it may help keep you healthy if you’re well and how it can play a role in a treatment plan.

Magnesium May Improve Insulin Function in Type 2 Diabetes

“Preliminary studies show that magnesium may improve insulin sensitivity,†says Wagner. A study found that people with the highest intake of magnesium had a 15 percent lower risk of developing type 2 diabetes compared with the group who consumed the lowest amount. (3) The mineral, she says, allows insulin to be more responsive to the sugar in the bloodstream and ferry it into your cells more quickly.

Anxiety May Be Tempered With Magnesium, but More Research Is Needed

“Magnesium can be beneficial in balancing the neurotransmitters glutamate and GABA (gamma-aminobutyric acid),†says Wagner. GABA, for instance, relies on magnesium for its receptors to function properly, she says. GABA is a calming neurotransmitter, while glutamate is an excitatory one. An imbalance can make you feel on edge, says Wagner. While a review in the journal Nutrients suggests that people who supplement with magnesium may report lower levels of anxiety, there are questions on the quality of that evidence, so more research is needed. (4)

Not Getting Enough May Increase Depression Risk

People who had a low intake of magnesium were 16 percent more likely to have depression, particularly for adults under age 65, according to a study of nearly 9,000 adults. (5) In fact, the researchers found that there was a 50 percent greater rate of depression among adults consuming the lowest amount of the mineral compared with those consuming the highest amount.

Not only is magnesium important for those neurotransmitters that keep mood at an even keel, but it may also help control inflammation, another factor believed to be at the heart of developing psychological disorders, researchers note.

Magnesium May Reduce Headaches and Migraine

“I’m always recommending magnesium for regular headaches and migraine,†says Wagner. “It’s a really basic intervention that can make a massive difference,†she says. A review published in the journal Headache suggested that consuming 600 mg of magnesium regularly in the diet may help prevent headaches, though the authors noted that more studies are needed. (6) Both the American Academy of Neurology and the American Headache Society list magnesium as â€probably effective†for migraine prevention.

Wagner often advises patients to consume more magnesium-rich foods (like nuts, seeds, greens), and have a supplement on hand for times when extra stress or travel may trigger head pain. Foroutan recommends magnesium for headaches associated with premenstrual syndrome (PMS) or premenstrual dysphoric disorder (PMDD; a more severe form of PMS).

Magnesium May Address Sleep Disorders in Several Ways

For one, muscle twitching at night can prevent you from falling asleep or disturb your slumber. “Twitching or cramping is frequently caused by a mineral imbalance, so I find that magnesium is often an easy place to start,†says Foroutan. It may also help promote calm or improve mood or anxiety, which will set the stage for better rest, she says. It’s important to know what the issue is that’s getting in the way of your sleep, as that will inform what type of magnesium supplement is best to take.

For Constipation, Magnesium Can Get Things Going Again

Constipation is uncomfortable to live with. “I recommend magnesium to help reestablish normal bowel movements,†says Foroutan. Certain types of supplements (see below) will be best for promoting productive bowel movements. Foods with magnesium also often contain fiber and can prevent constipation.

Magnesium Is Important for Preventing Bone Fractures

“Magnesium has a significant role in bone health,†says Wagner, who suggests that anyone with a history of osteopenia or osteoporosis consider supplementing with extra magnesium along with calcium and vitamin D. But it may be helpful before it gets to that point. The mineral is a physical component of your bones, researchers pointed out in a study. (7) They looked at the association between serum magnesium levels and odds of bone fracture in men, finding that low levels were an independent risk factor for fracture.

For women, those who met magnesium intake recommendations either via food or supplements had a 27 percent lower likelihood of having fractures in the future compared with folks who fell short, says another study. (8)

Best Types of Magnesium Supplements to Take

There are several types of magnesium supplements, and some may be better than others for your health concern.

Magnesium Citrate Best used for concerns like constipation. “You get a high dose of this to prepare for a colonoscopy. It has a laxative effect that flushes you out.

Magnesium Oxide This is another that Foroutan recommends for addressing constipation concerns, for the same reason as magnesium citrate. It has a lower bioavailability than other forms of magnesium, but it may still offer benefits. Mainly, it’s used to treat migraine and constipation.

Magnesium Threonate If you’re struggling with stress, mood, or sleep issues, “magnesium threonate might be a better choice, because it can cross the blood-brain barrier,†says Foroutan.

Magnesium Glycinate This form of magnesium is well absorbed, which is why Foroutan suggests it to address muscle cramping or twitching. In addition to promoting muscle function, Wagner will also suggest this form for sleep concerns. “Glycine is very calming,†she says.

Magnesium Lactate This form of the mineral is often recommended for heartburn, indigestion, or upset stomach. The organization recommends taking it with food to lessen the chance of side effects like diarrhea, and talk to your doctor prior to taking it if you have a heart or kidney condition.

Magnesium Sulfate This form of magnesium is also known as Epsom salt. Most frequently, it’s used as a soak for muscles or relaxation. Some people use magnesium sulfate as a laxative (it attracts water into the intestines), but University of Michigan Health cautions against doing this without doctor supervision. (10)

Do You Need to Take a Magnesium Supplement?

Not everyone will require a supplement, and it may be recommended that you start with consuming more magnesium via your diet first. After all, foods high in magnesium offer additional nutrients, such as fiber, vitamins, and minerals.

Magnesium-Rich Foods

According to the NIH and Cleveland Clinic, the following foods offer magnesium: (1,11)

  • Pumpkin seeds, 168 mg per ounce
  • Almonds, 80 mg per ounce dry roasted
  • Cashews, 74 mg per ounce dry roasted
  • Peanuts, 63 mg per ¼ cup oil roasted
  • Spinach, 78 mg per ½ cup boiled
  • Black beans, 60 mg per ½ cup cooked
  • Edamame, 50 mg per ½ cup cooked
  • Dark chocolate, 50 mg per ounce serving of 60–69 percent cocoa
  • Whole-wheat bread, 46 mg per 2 slices
  • Avocados, 44 mg per cubed cup

Optimizing your diet by eating magnesium-rich foods is the best way to get that nutrient. If you are interested in taking a supplement, work with your healthcare team so they can consider your specific health concerns and recommend the best type and amount for you, says Foroutan. If you are supplementing, “choose one from a reputable company that has stringent standards for quality and efficacy,†she says.

Editorial Sources and Fact-Checking

  1. Magnesium. National Institutes of Health. June 2, 2022.
  2. Nutrient Recommendations and Databases. National Institutes of Health.
  3. Hruby A, Guasch-Ferré M, Bhupathiraju SN, et al. Magnesium Intake, Quality of Carbohydrates, and Risk of Type 2 Diabetes: Results From Three U.S. Cohorts. Diabetes Care. December 2017.
  4. Boyle NB, Lawton C, and Dye L. The Effects of Magnesium Supplementation on Subjective Anxiety and Stress — a Systematic Review. Nutrients. May 2017.
  5. Tarleton EK, Littenberg B. Magnesium Intake and Depression in Adults. Journal of the American Board of Family Medicine. March–April 2015.
  6. von Luckner A, Riederer F. Magnesium in Migraine Prophylaxis — Is There an Evidence-Based Rationale? A Systematic Review. Headache. February 2018.
  7. Kunutsor SK, Whitehouse MR, Blom AW, Laukkanen JA. Low Serum Magnesium Levels are Associated With Increased Risk of Fractures: A Long-Term Prospective Cohort Study. European Journal of Epidemiology. July 2017.
  8. Veronese N, Stubbs B, Solmi M, et al. Dietary Magnesium Intake and Fracture Risk: Data From a Large Prospective Study. British Journal of Nutrition. June 2017.
  9. Deleted, August 19, 2022.
  10. Magnesium Sulfate (Epsom Salt). University of Michigan Health. March 27, 2014.
  11. Magnesium Rich Food. Cleveland Clinic. November 24, 2020.