Magnesium is trending thanks to TikTok, where it is being touted as a miracle supplement.

In a TikTok video that has now received over 17 million views and over 1 million likes, since being picked up by multiple media outlets, a self-described “cool mom” and optometrist describes the supposed benefits of magnesium. Holding a bottle of magnesium glycinate before the camera, she gives it a little shake before explaining, “I needed to fix my sleep and anxiety. Nothing ever works.”

After taking it for the first time, she “woke up in the morning early, feeling rested. ... I thought it was a fluke,” she says. “I tried it again the next day and the next day and the next day — I was waking up before my alarms feeling OK. The whole day I felt OK.”

And not only did her sleep improve, she adds, but she hasn’t been feeling anxious.

So should we all take magnesium to ensure a good night’s sleep and to put anxiety to rest, too?

Recent research offers, at best, conflicting answers. 

Crucial for a wide range of our bodies’ processes, magnesium, an electrolyte, helps regulate nerve and muscle function, keeping heart rhythm normal by assisting with the transfer of potassium and calcium, according to the National Institutes of Health. The mineral also assists in blood sugar and blood pressure regulation and is critical to bone health, according to Harvard Medical School. Because magnesium plays such an important role in our bodies, severe magnesium deficiency can be life-threatening, according to the Cleveland Clinic.

As for the mineral’s ability to improve your life, some research suggests that magnesium might be effective in treating mild anxiety. A 2017 review of 18 previous studies examining the link between magnesium and anxiety found that supplements did confer some benefits to those prone to anxiety (with the exception being moms suffering from postpartum anxiety). “However, the quality of the existing evidence is poor,” the authors noted. 

Similarly remarking that there is a need for additional, larger studies, psychiatrist Gregory Scott Brown told National Geographic “there is some evidence that magnesium can help with mild anxiety and even mild forms of depression.” Brown, who is an affiliate faculty member at the University of Texas Dell Medical School, emphasized, however, that those struggling with severe anxiety or depression should seek professional help. 

Stressed? Here are 4 techniques to reduce anxiety
How breath work can help calm your kids

And, thus far, despite the anecdotes on TikTok, there is scant research proving that magnesium improves sleep. 

A 2012 study of 46 elderly participants who were monitored over the course of eight weeks found that those who took magnesium did have some markers of better sleep — including increased melatonin, the hormone that helps regulate our sleep-wake cycle or circadian rhythm. However, there was not a significant difference in “total sleep time” between the group who received magnesium versus participants who took a placebo. 

And a recent comprehensive review of existing studies about the connection between magnesium and sleep was inconclusive, with the authors calling for rigorous scientific research to better examine the link between the two. 

“The association between dietary magnesium and sleep patterns needs well-designed randomized clinical trials with a larger sample size and longer follow-up time (more than 12 weeks) to further clarify the relationship,” they wrote in the paper, which appeared in the January 2023 edition of the Biological Trace Element Research journal. 

What’s the sleep ‘sweet spot’ to boost longevity?
Can you ever truly catch up on sleep?
Co-sleeping with kids: A tired mother looks at the data

Moreover, magnesium supplements aren’t for everyone. Magnesium is processed by the kidneys; those with chronic kidney disease, for example, shouldn’t take magnesium unless their doctor has prescribed the supplement, according to Harvard Medical School

For those who are healthy, and want to try a magnesium supplement to improve their sleep, experts suggest either magnesium glycinate or magnesium citrate, taken 30 minutes before bed. But experts advise against megadosing, according to USA Today. And it’s always good to check with your doctor before beginning any sort of supplement. 

The best way to ensure you’re getting enough magnesium — and other crucial vitamins and minerals — is to eat a well-rounded, healthy diet. 

If you want to up your magnesium intake the natural way, try eating leafy greens, peanuts, almonds and cashews, beans, bananas, salmon, milk, yogurt and dark chocolate. (Check out the complete list of magnesium rich foods at the National Institutes of Health.)

As for anxiety and insomnia, a little exercise can go a long way — even a 10-minute walk can help relieve anxiety symptoms, according to the Anxiety & Depression Association of America. Research shows nature walks to be particularly beneficial.