Can Magnesium Really Help You Sleep? We Asked 2 MDs

Within the realm of supplements, magnesium can seem like a relatively safe option. It's a mineral that's naturally found in foods like vegetables, grains, and legumes, after all. Even the purported benefits of magnesium — better sleep, less stress — make it sound like a pretty low-risk addition to your wellness routine. But can magnesium really help you sleep? And does magnesium have any side effects that you should know about?

Magnesium does have relaxing properties that can calm muscle (and mental) tension, and many people swear by it as a sleep aid. But some experts say its benefits aren't quite as strong as supplement companies would have you believe. What's more, the mineral isn't something you can safely take huge quantities of; you have to know the right dose. Plus, supplements use different forms of magnesium, and certain types of magnesium can have side effects that you definitely want to avoid.

If you're interested in using magnesium to help you sleep, read on. We asked two MDs to break down everything to know about using magnesium for sleep.


Experts Featured in This Article

Alon Avidan, MD, MPH, is a professor of neurology at the David Geffen School of Medicine at UCLA and the director of UCLA's Sleep Disorders Center.

Rajkumar Dasgupta, MD, is an associate professor of clinical medicine at USC's Keck School of Medicine and an American Academy of Sleep Medicine spokesperson.


Will Taking a Magnesium Supplement Improve Your Sleep?

Magnesium, an essential mineral that plays a role in more than 300 different processes in the body, has gained popularity as a sleep aid because it's known to ease muscle tension and create a general feeling of relaxation. Magnesium's sleep benefits aren't as legit as it may seem on the wellness side of TikTok, however. In fact, experts agree that magnesium isn't for everyone.

"The data so far [about magnesium's benefits as a sleep aid] is weak at best," Alon Avidan, MD, MPH, a professor of neurology at the David Geffen School of Medicine at UCLA and the director of UCLA's Sleep Disorders Center, tells PS. Many of the studies that have been conducted were "not done with the strongest clinical evaluation," he explains, which is problematic when "a high placebo response is really common." These tests look at the Insomnia Severity Index, which is known to be highly subjective. In Dr. Avidan's view, a strong sleep study would include close monitoring for about six months, and no studies he's seen have actually done that.

In one 2021 systematic review and meta-analysis of three randomized control trials published in the journal BMC Complementary Medicine and Therapies, researchers found that adults fell asleep about 17 minutes faster and slept 16 minutes longer when they took a magnesium supplement compared to a placebo; however, the study authors note that this time wasn't statistically significant, and that "the quality of literature is substandard for physicians to make well-informed recommendations on usage of oral magnesium for older adults with insomnia."

In a 2024 systematic review of 15 studies that looked into magnesium's affects on insomnia and anxiety and was published in the journal Cureus, researchers concluded that a lack of consistency in the data and the small number of participants in most studies made drawing firm conclusions difficult.

That said, the study authors wrote, "Given the generally positive results across studies, the preponderance of preclinical evidence, and minimal side effects, however, supplemental magnesium is likely useful in the treatment of mild anxiety and insomnia, particularly in those with low magnesium status at baseline." The 2021 study also indicated that since magnesium is cheap and accessible, the evidence may be enough to support trying a low dose (less than 1 gram, up to three times per day; most studies seem to max out at 729 mg) for insomnia.

Magnesium has also been proven to help people with restless leg syndrome (RLS), which makes the supplement a viable option for those whose sleep problems stem from their urge to move at night. This includes nonclinical conditions, like involuntarily kicking in your sleep. If you have RLS or otherwise feel restless at night, Dr. Avidan notes that taking magnesium about 20 to 30 minutes before bed may help.

Does Magnesium Have Any Side Effects?

It does — and the most common one is GI upset. A form of magnesium known as magnesium citrate is a common ingredient in laxatives, because it's so effective at treating constipation. If you don't have constipation, though, it can cause bloating, stomach pain, or diarrhea. And Dr. Avidan says if you already have any gastrointenstinal issues, magnesium could potentially exacerbate them. Magnesium glycinate is supposed to be gentler on the gut, but even that taken in too high of a dose can upset the stomach.

Since supplements aren't well regulated, you also have to consider the possibility that the magnesium supplement you take could have other ingredients in it with their own side effects. "[Magnesium supplements] products may be marketed and sold without FDA approval and may involve dangerous side effects or adverse drug reactions," says Rajkumar Dasgupta, MD, associate professor of clinical medicine at USC's Keck School of Medicine and an American Academy of Sleep Medicine spokesperson. Dr. Dasgupta adds that, for this reason, he encourages anyone who wants to start a supplement to discuss it with their doctor first.

Additionally, if your insomnia is severe, the best thing you can do is talk to your primary care physician. "We don't want people to be self-medicating," Dr. Avidan says — because there's a risk that by simply masking your symptoms with supplements, you're leaving a more serious condition, like sleep apnea, untreated. So, make that appointment.

— Additional reporting by Mirel Zaman


Maya Garabedian is a PS contributor.



Mirel Zaman is the health and fitness director at PS. She has nearly 15 years of experience working in the health and wellness space, writing and editing articles about fitness, general health, mental health, relationships and sex, food and nutrition, astrology, spirituality, family and parenting, culture, and news.