What Is Magnesium Good for, Exactly?

Here, doctors and dietitians break down everything you need to know about this superhero nutrient. Short answer? Magnesium is good for lots of things.

Vitamins and minerals can act as magical elixirs when it comes to improving your health. Want thicker, shinier strands? Vitamin D, which accelerates follicle growth and strength, might be able to help. Need to power through that final set of deadlifts? Muscle-boosting calcium can assist with that. Looking to score better sleep or improve your mood? Turns out magnesium is good for helping you achieve all that — and potentially more. Here, your primer on magnesium, what it's good for, and how to get enough.

The Basics of Magnesium

Simply put, magnesium is a mineral — and it's super important for your bodily functions. But what is magnesium good for, exactly? "Magnesium is absolutely essential in energy production. It also plays a crucial role in the enzymatic reactions that drive your heart and brain," says Erica Locke, M.D., founder of The Doc's Dish, a website that featuresdoctor-approved healthy recipes and cooking tips. In other words, magnesium supports hundreds of chemical reactions or processes in your body, including regulating muscle and nerve function, blood sugar levels, and blood pressure as well as making protein, bone, and DNA, according to the National Institutes of Health.

And for covering so much territory health-wise, it should come as no surprise that magnesium is also associated with disease and illness prevention. A 2018 study in the International Journal of Endocrinology found that magnesium might play a role in preventing type 2 diabetes, Alzheimer's disease, hypertension, chronic kidney disease, and strokes.

While magnesium is crucial for your bodily functions, it's quite possible you're not getting enough. Studies have shown that nearly two-thirds of Americans don't get the recommended daily intake of magnesium — anywhere from 310 to 420 mg for adults based on certain factors, according to the NIH. One reason: The mineral is found in abundance in vegetables — especially dark leafy greens such as spinach, kale, and collard greens — but 90 percent of adults aren't eating enough produce, according to the Centers for Disease Control and Prevention. Whole grains and beans are other top sources, but many folks are also consuming too few of those healthy foods. Active people need to be especially vigilant about their magnesium intake — the mineral is lost through sweat, so if you perspire a lot during exercise, your body may require more.

Stress also depletes magnesium stores: It typically lives inside cells in the body, but when anxiety strikes, it migrates outside cells as a protective mechanism to help you cope. During fraught times — whether you're feeling overwhelmed with work deadlines or there's a physical stressor such as getting your period — the body excretes magnesium in response. And to make matters worse, some things you might do to help deal with the tension, such as drinking extra cups of coffee to stay energized or having several glasses of wine to relax, also impair levels of the mineral, says Tracy Lockwood Beckerman, R.D.N., a registered dietitian in New York who focuses on women's health. "Too much caffeine and alcohol can deplete magnesium in our bodies," she says.

The good news? Getting your fill of magnesium is pretty easy. Ahead, experts explain how to do just that — plus, the magnesium health benefits you should know.


Magnesium Health Benefits

If you're wondering, "What is magnesium good for?" this list of specific health benefits of magnesium will help spell it out for you.

Reduces Muscle Cramps

This may be the most well-known magnesium health benefit, but it's worth mentioning. If you're feeling particularly sore and tired while lifting, getting your recommended daily dose of magnesium might help ease those aches. Here's why: When you're working out, your brain tells your muscles to fire by signaling a release of calcium from a structure inside your muscles; that calcium causes the muscle fibers to shorten and contract (thus, the cramping or soreness), explains Dr. Locke. But magnesium "serves as the 'Yin' to calcium's 'Yang,'" counteracting the calcium and, in turn, allowing your muscles to relax in preparation for the next contraction, she says. So the more magnesium available to offset calcium's buildup, the fewer the cramps.

And while simply following a rigorous workout regimen can contribute to body soreness, other types of muscle spasms—such as those stemming from your uterus during a period —can be eased with magnesium, too, notes Dr. Locke. Magnesium helps the contracting muscle, or the uterus, relax by countering the calcium there as well, she explains.

Supports Heart Health

A 2018 review of studies suggests that higher levels of magnesium in the body are associated with a reduced risk of certain cardiovascular diseases (i.e. hypertension or stroke). "Magnesium increases nitric oxide in the blood, which helps to relax blood vessels and soothe muscles," including those in your heart, explains Dr. Locke. And in doing so, magnesium is believed to help lower your blood pressure, which is key in preventing heart disease. What's more, magnesium helps you maintain a stable heartbeat. Without this powerful mineral, calcium might overstimulate your heart's muscle cells (think: all of those contractions), causing a potentially life-threatening arrhythmia.

Alleviates Depression

Low levels of magnesium have been linked to an increased risk of depression. So, getting enough magnesium might actually boost your mood and better your mental health. Basically, too little magnesium and too much calcium can cause your brain synapses to function irregularly, says Dr. Locke. "It's the same type of pathway we see with muscle spasms — only this spasm is happening in the brain," she explains. And while science — such as a 2017 PloSOne study that found magnesium supplements might ease depressive symptoms — is promising, the exact effects of the mineral on the brain and mood are not totally understood. (

Reduces Risk of Kidney Stones

In addition to chugging water, keeping up with your magnesium intake might also help you steer clear of kidney stones. The mineral helps to offset the buildup of calcium in your kidneys and, in turn, thwart it from crystallizing, says Dr. Locke. (ICYDK, kidney stones are formed when calcium binds to other minerals and crystalizes, according to the Mayo Clinic.)

Helps Ease Migraines

One thing magnesium is good for? Migraines. In fact, Dr. Locke says she frequently uses magnesium infusions in the emergency room to treat patients who come in with serious migraines. A 2015 study found that a daily intake of 600 mg of magnesium reduced migraine frequency by 42 percent. Meanwhile, the American Migraine Foundation notes that magnesium, given its impressive safety profile, is one of a person's top tools in combating and treating these nightmare headaches.

Improves Sleep

While more research on the topic is needed, emerging evidence suggests that magnesium might be the secret to scoring more sleep. In one small clinical trial of 43 elderly folks, those who were given 500 mg of magnesium for eight weeks fell asleep faster and spent more time asleep than their counterparts, who were only given a placebo. Meanwhile, another small older study noted that magnesium might play a role in helping people with restless leg syndrome achieve better zzz's.

How to Know If You're Getting Enough Magnesium

While not as accurate as a blood test, listening to your body can help you figure out whether or not you're getting ample amounts of magnesium — and scoring its health benefits. Grogginess, fatigue, and lethargy can all hint at low levels of magnesium since the mineral plays an important role in energy production, says Carrie Lam, M.D., a board-certified doctor who also specializes in nutrition coaching. Likewise, you may experience leg cramping, sugar cravings, high blood pressure, anxiety, constipation, or trouble sleeping, says Olivia Wagner, R.D.N., a functional dietitian in Chicago who specializes in women's health.

You might also experience appetite changes and flu-like symptoms such as nausea, vomiting, and weakness, adds Abisola Olulade, M.D. But how can you know if your fatigue and flu-like symptoms are due to a magnesium deficiency as opposed to, you know, a virus? Well, that's not so clear-cut, says Dr. Olulade. If your flu-like symptoms come on suddenly, it's probably something else, as vitamin deficiencies develop (and manifest themselves) slowly, she notes. But your best bet for determining if you have a deficiency? Asking your physician for a blood test.

It's important to note, however, that the likelihood of having a magnesium deficiency as an otherwise healthy person is fairly low, according to the NIH. And it's all thanks to your kidneys, which naturally limit how much magnesium is excreted when you urinate.

How to Get Enough Magnesium

Want to make sure you're getting enough magnesium (and therefore reaping all those benefits)? Here are three surefire ways to ensure you're covered.

Level Up Your Diet

The easiest (and best) way to maintain adequate levels of the mineral and score all the magnesium health benefits? Eating a diet full of magnesium-rich whole foods, such as seeds, nuts, grains, leafy greens, and certain animal products, says Amy Shapiro, R.D., a New York City–based dietitian and founder of Real Nutrition.

Here are a few of Shapiro's favorite magnesium sources, and how much is contained within a serving according to the United States Department of Agriculture:

  • Almonds (80 mg per 1 oz serving)
  • Pumpkin Seeds (156 mg per 1 oz serving)
  • Dark chocolate (43 mg per 1 oz serving –– Shapiro's favorite source!)
  • Black Beans (60 mg per 1/2 cup serving)
  • Tofu (126 mg per 1/2 cup serving)
  • Leafy Greens (78 mg per 1/2 cup serving)

Consider Supplements

That being said, if you know your diet is lacking in the magnesium-rich foods department — or you're just curious about upping your intake — talk to your doctor about altering your diet or potentially supplementing with one of the pills, liquids, or powders on the market.

There are several forms of magnesium supplements available, so you can target your specific problem. For instance, if you have constipation, magnesium citrate can help relieve it. Athletes or those who experience muscle cramping should opt for magnesium glycinate. Magnesium threonate crosses the blood-brain barrier, so it's the best option if you have migraines, trouble sleeping, or anxiety. Wagner typically starts clients on 200 to 400 milligrams per day, but be sure to talk to your health care provider before you start supplementing. No matter which one you choose, make sure to pair your supplement with foods that ensure optimal magnesium absorption, such as salmon, avocado, or olive oil, says Dr. Locke. (

Give Yourself a Break

To nab all the magnesium health benefits, take a chill pill. "Anything that reduces stress will help with your magnesium status," says Wagner. So make time to do the things that calm you — take a walk outside, do a workout you love, or spend time having fun with friends. In addition, it's important to ease the physical stressors on your system at the same time, she adds. That means drinking plenty of water to keep your body hydrated, eating protein and healthy fats with meals and snacks to help keep your blood sugar stable, and getting at least seven hours of sleep a night.

Okay, but is it possible to get too much magnesium in your diet? Probably not, but you might experience some temporary unwanted symptoms if you're taking a supplement, says Dr. Olulade. "High doses from supplements and medication can cause diarrhea, nausea, and stomach cramps," she notes. (Fun fact: Magnesium is sometimes found in laxatives.) And if that happens, be sure to contact your primary care physician to discuss alternative ways to boost your magnesium intake if you truly need to for optimal health.

Updated by Jessica Migala
Was this page helpful?
Related Articles