Which Magnesium is Best for Sleep and Anxiety? And How It Might Help

Daniel Z. Lieberman, MD

Reviewed by Daniel Z. Lieberman, MD

Written by Hadley Mendelsohn

Published 08/27/2024

Sleep issues and anxiety often go hand-in-hand. Just as poor sleep patterns contribute to anxiety, the persistent worries and fears of anxiety can lead to sleep disturbances. This creates a cycle that can be both mentally and physically exhausting.

Luckily, there are ways to find relief, like following a healthy eating plan, exercising regularly, and possibly taking certain supplements. Magnesium, in particular, has garnered a lot of buzz lately thanks to its reputation in some circles as “nature’s chill pill.”

While there isn’t enough scientific research available to say exactly how effective magnesium is at addressing sleep and anxiety concerns, there are some indications that it may help with both.

Below, we break down the different types of magnesium supplements for anxiety and sleep issues, how magnesium might improve symptoms of anxiety and enhance sleep quality, and other ways to treat mental health conditions (like anxiety) and sleep disorders.

Magnesium is an essential mineral that helps regulate a variety of bodily functions, including managing muscle and nerve activity, protein production, and blood sugar and blood pressure levels.

Because magnesium plays a role in regulating the central nervous system, it may indirectly impact mood and sleep as well.

Many foods contain magnesium, so you can get it from your diet, but dietary supplements can help boost magnesium levels in your body if your diet alone isn’t enough.

How Much Magnesium Should You Get?

On average, men need 300 milligrams of magnesium daily, while women need 270 milligrams a day.

Even though it’s an essential mineral, about 50 percent of Americans get less than the recommended daily amount. The best way to make sure you’re getting enough magnesium is to eat more of these magnesium-rich foods:

  • Whole grains, like quinoa, brown rice, and oatmeal

  • Avocado

  • Leafy greens, like arugula, kale, and spinach

  • Nuts, especially almonds and cashews, and seeds (like chia and pumpkin seeds)

  • Legumes, like beans

  • Dark chocolate

  • Fish

  • Fermented foods, like yogurt

Oh, and getting regular exercise can help your body use magnesium more efficiently (and it’s also linked with improved moods and sleep). But, be aware that strenuous exercise can also deplete magnesium levels, making a balanced diet even more important.

Are There Any Symptoms for Low Magnesium Levels?

It’s helpful to know what signs point to lower levels so you can make a concerted effort to increase your magnesium intake if need be.

Some signs of low magnesium include:

  • Loss of appetite

  • Nausea

  • Vomiting

  • Fatigue

  • Constipation

  • Changes in personality

  • More intense premenstrual syndrome (PMS)

  • Numbness and tingling

  • Muscle weakness, contractions, and cramps

  • Abnormal heart rhythms or irregular heartbeat

Keep in mind that having lower magnesium levels doesn’t necessarily mean you have a magnesium deficiency.

online mental health assessment

your mental health journey starts here

Not all magnesium supplements are equal. Some are better absorbed by the body, which may make them more effective. They’re also sometimes combined with other ingredients to create certain effects and boost the benefits.

Let’s explore the many different types of magnesium supplements:

  • Magnesium Malate. A combination of magnesium and malate, this kind of supplement can help with headaches. One study suggests that the body absorbs it very well, contributing to its efficacy.

  • Magnesium Taurate. This combines magnesium and the amino acid taurine (also naturally produced in the body), which is linked with relaxation. The same study mentioned above found that it was the second-best absorbed form of magnesium.

  • Magnesium L-Threonate. Some research shows that this type of magnesium is associated with improved cognitive function and sleep quality, though more studies are needed to understand how effective it really is. It’s also pretty well-absorbed by the body.

  • Magnesium Glycinate. Manufacturers combine this type of magnesium with glycine, an amino acid. The body absorbs this type of magnesium more easily compared to other formulations. Researchers aren’t exactly sure how glycine works, but one animal study found that it helped improve sleep. We have to be careful with animal studies, though, because the same results are often not found in humans. It’s also less likely to interfere with digestion.

Other types of magnesium that aren’t necessarily linked with reducing anxiety and helping with sleep are:

  • Magnesium Citrate. The body can absorb this form of magnesium quickly and easily, so it’s considered one of the more effective forms. In supplement form, it’s bound with citric acid, but it can be naturally found in oranges, grapefruit, and bananas. It’s sometimes used to help relieve constipation.

  • Magnesium Chloride. This type of magnesium has chloride in it and is usually sold as a supplement capsule. It’s relatively well-absorbed.

  • Magnesium Sulfate. This is most commonly used to help relieve constipation in the short term. It’s often found in the form of a powder. Magnesium sulfate is also commonly known as Epsom salt and is used in bath soaks for muscle relaxation.

  • Magnesium Oxide. This form of magnesium is inorganic, and the body doesn’t absorb it very well, which also means it’s less effective. But because it’s cheap and easy to manufacture, you may see it in some supplements.

So, which is the best one for sleep and anxiety?

The answer is twofold: One, it will probably depend on the underlying reasons for your anxiety and sleep issues. Two, the research isn’t totally clear.

That said, based on the information we do have, magnesium taurate and magnesium glycinate may be the best options for sleep and anxiety.

So, does magnesium help with sleep and anxiety? Study results have been mixed, but some research on magnesium supplements for anxiety and sleep is promising.

Let’s dive into the details of how magnesium could support lower anxiety and better sleep.

1. Magnesium May Help Manage Cortisol Levels

When you’re feeling stressed, your body releases cortisol, which is colloquially known as the “stress hormone.” Raised cortisol levels are linked with increased anxiety and elevated blood pressure.

Some research suggests that higher magnesium levels can help lower cortisol levels when you’re feeling stressed. So even if it doesn’t have a direct calming effect, it may help you feel more even-keeled.

2. Magnesium May Help with Some Symptoms of Depression

According to one review, low levels of magnesium were linked to a variety of mental health conditions, including depression. But the studies didn’t find a definitive link between anxiety disorders (like general anxiety disorder and panic disorder) and low magnesium levels.

Some symptoms of depression are having less energy, difficulty sleeping, and feeling irritable or anxious. So, even though there isn’t much research supporting the effect of magnesium on anxiety, it may help with associated feelings of depression or sleep issues.

3. Magnesium May Alleviate Symptoms of PMS

Another research review examined how magnesium affects people prone to anxiety, including those with mild anxiety and PMS-related unease.

Some studies they analyzed suggest that magnesium supplementation can help with mild anxiety and PMS-related anxiety. Magnesium may also help with other PMS symptoms, like cramps.

4. Magnesium May Promote Longer Sleep Time

In one study that examined how the amount of magnesium consumed links to sleep quality, participants who got the highest levels of magnesium seemed to get the best night’s sleep. They were also less likely to get too little sleep (seven hours or less a night) than those with low magnesium intake.

This difference appeared more noticeable in people without depression. For those with depression, magnesium didn’t seem to affect their sleep quality or duration.

However, the difference in sleep quality ratings wasn’t significant enough to say for sure if magnesium intake was the reason for the improved sleep quality.

5. Magnesium Might Make It Easier to Fall Asleep

Some studies suggest that magnesium may help some people fall asleep faster and feel less sleepy throughout the day. That said, other studies indicate that there isn’t enough clear evidence to definitively confirm whether or not magnesium actually improves sleep.

Additional research suggests that taking both melatonin and magnesium supplements together might lead to better sleep quality in women with polycystic ovary syndrome (PCOS). Melatonin is a naturally occurring hormone that helps regulate the sleep-wake cycle, but is also available as a supplement to help with sleep.

6. Magnesium May Address Restless Leg Syndrome (RLS)

Restless leg syndrome is one of the most common sleep disorders. It’s marked by a seemingly random urge to move your legs and feet. It usually crops up at night, and the symptoms can lead to anxiety and make it hard to sleep.

So, where does magnesium come into play?

One small study looked at how magnesium and vitamin B6 supplements helped with the symptoms of RLS. Though researchers aren’t totally sure why, this combination helped reduce the severity of RLS symptoms.

If you’re planning on adding magnesium supplements to your nighttime routine, it’s good to be aware of some of the side effects.

The most common side effects of excessive magnesium intake are digestive-related. Since some forms of magnesium supplements are used as mild laxatives, it’s not surprising that they can cause diarrhea. Other side effects of too much magnesium can include:

  • Nausea and vomiting

  • Abdominal cramps

  • Facial flushing

  • Urine retention (a blockage that can prevent urine from leaving the body)

In general, it’s best to speak with a healthcare professional before adding any new supplements to your routine.

Some people take magnesium to help with sleep issues or anxiety, but there are other, more science-backed ways to treat both conditions.

While everyone gets anxious occasionally, it may be time to reach out to a healthcare provider if your symptoms are persistent and overwhelming. Depending on your concerns, your provider may recommend trying some form of psychotherapy or medication, or a combination of the two.

Some prescription mental health treatments include:

  • Selective Serotonin Reuptake Inhibitors (SSRIs) are a commonly prescribed class of antidepressants that act on serotonin to treat depression and anxiety. Examples include escitalopram (Lexapro®), sertraline (Lustral and Zoloft®), and fluoxetine (Prozac®).

  • Serotonin-Norepinephrine Reuptake Inhibitors (SNRIs) are a type of antidepressant that acts on the neurotransmitters serotonin and norepinephrine. They’re often prescribed to treat chronic pain, depression, and anxiety. Examples include duloxetine (Cymablta®) and venlafaxine (Effexor®).

  • Anti-anxiety medications like buspirone (BuSpar®) are sometimes prescribed to treat generalized anxiety disorder in the short term. Researchers don’t fully understand how it works as an anxiety treatment, but they believe it helps regulate levels of serotonin and dopamine.

  • Atypical antidepressants like bupropion (Wellbutrin®) are often used to treat depression. Researchers think bupropion works by affecting norepinephrine and dopamine, chemicals in the brain that impact mood, motivation, and more.

If you think you might be a fit for any of the above medications, reach out to a healthcare professional. They’ll talk to you about your symptoms and develop a treatment plan that works for you.

If you have insomnia or another sleep disorder — or your sleep issues are affecting your ability to function — you may also want to talk to your healthcare provider about prescription sleep aids and other treatment options.

psych meds online

psychiatrist-backed care, all from your couch

Neither anxiety nor sleep problems are fun to deal with — especially when you suffer from both. But there are ways to manage the symptoms. Some studies suggest that magnesium levels may play a role.

Here’s what to keep in mind about magnesium and its relationship to sleep and anxiety:

  • Magnesium is an essential mineral. To make sure you get enough of it, you should eat a balanced diet with plenty of legumes, greens, lean protein, and whole grains.

  • The best forms of magnesium for sleep and anxiety are likely magnesium taurate and magnesium glycinate, but the research is still a little shaky.

  • Some research suggests that magnesium may help with sleep and anxiety by regulating cortisol levels, helping improve mood, alleviating symptoms of PMS and RLS, and making it easier to fall asleep and stay asleep for longer.

  • Though some research shows that magnesium might help manage symptoms of stress and sleep disturbances, there are other options available with stronger science backing up their efficacy. Medications like prescription sleep aids or antidepressants might be an option.

If you’d like to learn more about managing mental health with medication, you can seek medical advice online through our psychiatry service. Our providers will evaluate your well-being, explain all your options, and work with you to determine which is the best fit for you.

22 Sources

  1. Alizadeh MO, et al. (2021). Metabolic and hormonal effects of melatonin and/or magnesium supplementation in women with polycystic ovary syndrome: a randomized, double-blind, placebo-controlled trial. Retrieved from https://nutritionandmetabolism.biomedcentral.com/articles/10.1186/s12986-021-00586-9
  2. Arab AR, et al. (2023). The Role of Magnesium in Sleep Health: a Systematic Review of Available Literature. Retrieved from https://pubmed.ncbi.nlm.nih.gov/35184264/
  3. Botturi AN, et al. (2020). The Role and the Effect of Magnesium in Mental Disorders: A Systematic Review. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7352515/
  4. Boyle NE, et al. (2017). The Effects of Magnesium Supplementation on Subjective Anxiety and Stress—A Systematic Review. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5452159/
  5. Costello RE, et al. (2016). Perspective: The Case for an Evidence-Based Reference Interval for Serum Magnesium: The Time Has Come. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5105038/
  6. Cuciureanu MA, et al. (2011). Magnesium and stress. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK507250/
  7. Hicks MA, et al. (2023). Magnesium Sulfate. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK554553/
  8. Jadidi AL, et al. (2022). Therapeutic effects of magnesium and vitamin B6 in alleviating the symptoms of restless legs syndrome: a randomized controlled clinical trial. Retrieved from https://bmccomplementmedtherapies.biomedcentral.com/articles/10.1186/s12906-022-03814-8
  9. Jangra AS, et al. (2024). Emergence of taurine as a therapeutic agent for neurological disorders. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10479846/
  10. Kalmbach DA, et al. (2018). The impact of stress on sleep: Pathogenic sleep reactivity as a vulnerability to insomnia and circadian disorders. Retrieved from https://pubmed.ncbi.nlm.nih.gov/29797753/
  11. Kawai NO, et al. (2015). The Sleep-Promoting and Hypothermic Effects of Glycine are Mediated by NMDA Receptors in the Suprachiasmatic Nucleus. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4397399/
  12. National Health Services. (2020). Vitamins and Minerals. Retrieved from https://www.nhs.uk/conditions/vitamins-and-minerals/others/.
  13. National Institutes of Health. (2022). Magnesium. Retrieved from https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  14. National Institute of Mental Health. (2024). Anxiety Disorders. Retrieved from https://www.nimh.nih.gov/health/topics/anxiety-disorders
  15. National Institute of Mental Health. (2024). Depression. Retrieved from https://www.nimh.nih.gov/health/topics/depression
  16. National Institutes of Neurological Disorders and Stroke. (2024). Restless Leg Syndrome (RLS). Retrieved from https://www.ninds.nih.gov/health-information/disorders/restless-legs-syndrome
  17. Neilsen FH, et al. (2006). Update on the relationship between magnesium and exercise. Retrieved from https://pubmed.ncbi.nlm.nih.gov/17172008/
  18. Schutten JO, et al. (2019). Effects of magnesium citrate, magnesium oxide and magnesium sulfate supplementation on arterial stiffness in healthy overweight individuals: a study protocol for a randomized controlled trial. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6540466/
  19. Tick HE. (2015). Magnesium Glycinate. Retrieved from https://www.sciencedirect.com/topics/medicine-and-dentistry/magnesium-glycinate
  20. Uysal NA, et al. (2019). Timeline (Bioavailability) of Magnesium Compounds in Hours: Which Magnesium Compound Works Best? Retrieved from https://pubmed.ncbi.nlm.nih.gov/29679349/
  21. Zhang CH, et al. (2022). A Magtein®, Magnesium L-Threonate, -Based Formula Improves Brain Cognitive Functions in Healthy Chinese Adults. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9786204/
  22. Zhang YI, et al. (2022). Association of magnesium intake with sleep duration and sleep quality: findings from the CARDIA study. Retrieved from https://academic.oup.com/sleep/article/45/4/zsab276/6432454
Editorial Standards

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references. See a mistake? Let us know at [email protected]!

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.

Daniel Z. Lieberman, MD

Dr. Daniel Z. Lieberman is the senior vice president of mental health at Hims & Hers and of psychiatry and behavioral sciences at George Washington University. Prior to joining Hims & Hers, Dr. Lieberman spent over 25 years as a full time academic, receiving multiple awards for teaching and research. While at George Washington, he served as the chairman of the university’s Institutional Review Board and the vice chair of the Department of Psychiatry and Behavioral Sciences.

Dr. Lieberman’s has focused on , , , and to increase access to scientifically-proven treatments. He served as the principal investigator at George Washington University for dozens of FDA trials of new medications and developed online programs to help people with , , and . In recognition of his contributions to the field of psychiatry, in 2015, Dr. Lieberman was designated a distinguished fellow of the American Psychiatric Association. He is board certified in psychiatry and addiction psychiatry by the American Board of Psychiatry and Neurology.

As an expert in mental health, Dr. Lieberman has provided insight on psychiatric topics for the U.S. Department of Health and Human Services, U.S. Department of Commerce, and Office of Drug & Alcohol Policy.

Dr. Lieberman studied the Great Books at St. John’s College and attended medical school at New York University, where he also completed his psychiatry residency. He is the coauthor of the international bestseller , which has been translated into more than 20 languages and was selected as one of the “Must-Read Brain Books of 2018” by Forbes. He is also the author of . He has been on and to discuss the role of the in human behavior, , and .

Education

  • 1992: M.D., New York University School of Medicine

  • 1985: B.A., St. John’s College, Annapolis, Maryland

Selected Appointments

  • 2022–Present: Clinical Professor, George Washington University Department of Psychiatry and Behavioral Sciences

  • 2013–2022: Vice Chair for Clinical Affairs, George Washington University Department of Psychiatry and Behavioral Sciences

  • 2010–2022: Professor, George Washington University Department of Psychiatry and Behavioral Sciences

  • 2008–2017: Chairman, George Washington University Institutional Review Board

Selected Awards & Honors

  • 2022: Distinguished Life Fellow, American Psychiatric Association

  • 2008–2020: Washingtonian Top Doctor award

  • 2005: Caron Foundation Research Award

Publications

Read more