Anxiety Disorders
Magnesium Supplementation For Sleep & Anxiety
May 19, 2024 8 mins read

Chris Pagnani, MD
Founder & Medical Director
Rittenhouse Psychiatric Associates
Table of contents
What is Magnesium?
Magnesium is a naturally occurring element (Mg) that is essential to not only all human life, but all cellular life. It supports nerve function, muscle function, bone development, blood sugar control, and more, all of which are directly tied to sleep and mental health.
Magnesium can be found in green leafy vegetables, nuts, beans, and whole grains. Several conditions can predispose someone to low levels of magnesium, including kidney disease, digestive problems (such as Ulcerative Colitis and Crohn’s Disease), alcohol abuse, older age (above 65), and even certain medications that treat gastric reflux or heart conditions.
What does Magnesium Do?
Magnesium plays a key role in supporting the nervous system, making it a popular supplement for promoting sleep and reducing anxiety. It helps regulate mood and relaxation, and it may support deeper, more restful sleep by calming the nervous system. While research is still emerging, magnesium is also used to ease symptoms related to stress, insomnia, and anxiety-related conditions, in addition to its broader benefits for heart health, bone strength, and muscle function. Early studies suggest that supplementing magnesium in the deficient can improve natural melatonin production.
Does Magnesium Help with Anxiety, Sleep or Mood?
While the decision to take any supplement should be discussed with a medical provider, many tout magnesium supplements as a natural treatment for anxiety and insomnia. Magnesium may help to reduce anxiety by several mechanisms. Magnesium has a role in lowering blood pressure, via it’s involvement in the release of chemicals (such as nitric oxide) which dilate (or enlarge) blood vessels. Maintaining a healthy blood pressure can improve anxiety. Healthy levels of magnesium also promote healthy (and less tense) muscle tissue. With muscle tension and soreness being a manifestation of anxiety for many, reducing this tension can result in an improved level of anxiety, and allow individuals to feel more relaxed. Magnesium has been implicated as a natural supplement to promote healthy sleep, which can also help individuals to feel less anxious, and improve mood and energy as well. It is thought to help regulate sleep via the neurotransmitter GABA (which is your body’s main inhibitory [or calming] neurotransmitter). Magnesium has anti-seizure qualities and may help to promote healthy function of all neurotransmitters (think serotonin, norepinephrine, and dopamine – many of the same healthy brain chemicals that are targeted by psychiatric medications that treat depression and anxiety).
When Should Someone Consider Magnesium Supplementation?
If someone is struggling with their mood, anxiety or insomnia, discussing magnesium supplementation with their medical provider may be warranted. If someone has digestive issues, kidney problems, an unhealthy diet, takes medications for gastric reflux or their heart, or is over the age of 65, it may be even more important.
What to Know Before Taking Magnesium for Sleep and Anxiety
While magnesium is essential for healthy cellular function, taking too much, especially from over-the-counter supplements, can lead to serious side effects. These may include nausea, diarrhea, low blood pressure, upset stomach, irregular heart rhythms, breathing difficulties, kidney problems, and in extreme cases, even death. Excess magnesium can also disrupt levels of other essential minerals like potassium and calcium, which may cause severe complications. Doctors generally advise patients not to exceed 350 milligrams of magnesium in supplement form per day.
Because of these risks, it’s important to speak with a healthcare provider before starting magnesium supplementation. A simple blood test can check your magnesium level if there are concerns about your level. Magnesium may interact with medications such as antibiotics, diuretics, and heart medications, so a medical review is especially important if you’re already on prescription treatments.
For those experiencing moderate to severe anxiety, I strongly recommend a full evaluation by a mental health professional. While magnesium may be a helpful part of a broader treatment plan, especially if you have low magnesium levels, more significant conditions may require conventional medication, therapy, or a combination of approaches. Routine lab work and medical oversight can help ensure safe and effective use of magnesium supplements.
How do You Take Magnesium Supplements?
Magnesium supplements can be taken at anytime during the day, and with, or without food. However, as magnesium may increase GABA activity (promoting calmness and sleep), many individuals choose to take it in the evening, or before bed. Magnesium is also a natural laxative, and taking it at bedtime may promote healthy regular morning bowel movements. If magnesium causes upset stomach or diarrhea, then taking it with food may be prudent. Taking any supplement long-term, may have additional risks. For both short-term and long-term use, I always recommend having your medical provider test your magnesium level, as elevated levels of magnesium may be dangerous. If taken long-term, your provider may want to check your magnesium level on a regular basis, to make sure that your levels are not becoming elevated. For example, a baseline level, then a level 3-6 months later, and then every 6-12 months, depending on results. If a patient has certain heart, kidney or other conditions, their provider may want to check levels more regularly.
Which Types or Forms of Magnesium Are Best for Sleep and Anxiety?
There are several forms of magnesium supplements, each with unique benefits for sleep and mental well-being.
Magnesium glycinate is a highly absorbable form known for its calming effects. It may help reduce anxiety and promote relaxation, making it a popular option for improving sleep quality. Magnesium oxide, while less bioavailable, is often used to address magnesium deficiency and may support better sleep by replenishing low magnesium levels.
Magnesium L-threonate is a newer form that may cross the blood-brain barrier more effectively, showing promise for improving cognitive function and addressing age-related sleep disturbances.
While magnesium citrate is a common, cost-effective option with good absorption, those seeking specific support for sleep or anxiety may benefit from exploring these other targeted forms. Magnesium citrate also tends to have more gastrointestinal side effects.
Over-the-counter supplements are less regulated than medications, and it is not unheard of that routine auditing will find that the labels on supplements (even those sold at reputable vitamin stores) aren’t completely accurate regarding their contents and dosages. Vitamins and supplements are actually often taken off of the market, for this very reason. If someone is going to buy a supplement of any kind, I always recommend using a well-known and established large company, that holds itself to rigorous third-party certifications, such as Nature Made or Nature’s Way.
What are Some Other Ways to Treat Anxiety?
Regular exercise and physical activity is incredibly important for the treatment of both anxiety and insomnia. I recommend 30-40 minutes of cardiovascular activity (enough to break a slight sweat) 3-4 times per week. 10,000 steps a day (which can be easily monitored by most cellphones) is also a great starting point. Many do not realize the effect that caffeine has on both anxiety and insomnia. I recommend no more than one cup of coffee or energy drink per day, and never having it after 1 or 2PM. Be mindful of the number of espresso shots in those lattes! I am frequently reminding patients that any more than one shot of espresso in a drink, may be too much caffeine, and may be worsening their symptoms. Please keep in mind, that for moderate or severe symptoms, while trialing psychotherapy, exercise, dietary changes, and even supplements (under the supervision of a medical professional) may be reasonable, medication management may be necessary to fully treat your illness.
Beyond Magnesium: Other Ways to Manage Anxiety and Improve Sleep
While magnesium may play a helpful role in managing anxiety and supporting sleep, it’s just one piece of a larger puzzle. Regular physical activity is one of the most effective ways to reduce anxiety and improve sleep quality. Aim for 30–40 minutes of cardiovascular exercise, enough to break a sweat, at least 3-4 times per week. Even daily movement, like reaching 10,000 steps, can make a meaningful difference.
Caffeine intake is another key factor. Limiting yourself to one cup of coffee or energy drink per day and avoiding caffeine after 1 or 2 PM can reduce restlessness and improve sleep. Be especially mindful of espresso-based drinks, as multiple shots may worsen anxiety symptoms more than you realize.
While lifestyle changes, therapy, and supplements may provide relief for mild symptoms, those with moderate to severe anxiety or insomnia should consider a comprehensive approach. Medication management may be necessary, and it’s always best to work with a mental health professional to find the right treatment plan.
Though most people can maintain healthy magnesium levels through a balanced diet, a simple blood test can determine whether supplementation is appropriate. For some, magnesium may be the missing link, but it’s most effective when paired with a broader strategy for mental wellness.
Explore Your Options with Rittenhouse Psychiatric Associates
At Rittenhouse Psychiatric Associates, we take an evidence-based approach to care. Many of our providers currently, or have served as faculty at local academic institutions. Whether you’re considering magnesium to treat insomnia and anxiety or exploring other approaches, we’re here to help you find a plan that works.
Schedule an appointment with Rittenhouse Psychiatric Associates today to begin your journey to better mental health.
About the Author

Chris Pagnani, MD
Founder & Medical Director
Rittenhouse Psychiatric Associates
Chris Pagnani, MD is the Founder & Medical Director of Rittenhouse Psychiatric Associates. He serves as an Instructor of Psychiatry at Johns Hopkins Hospital and a Supervisor for young Psychiatrists at Jefferson Hospital. He is an elected member of the Board of Directors of Uplift: The Center for Grieving Children (which provides free grief therapy to inner-city youth in Philadelphia), and he maintains a full-time private practice of Psychiatry at Rittenhouse.
Related Articles
Women's Mental Health 4 mins read
Understanding Maternal Mental Health
*Co-authored by Dr. Emily Beinstein. A recent study published in JAMA Internal Medicine has ignited...
ADHD 6 mins read
Talk Therapy for ADHD: Effective Strategies and Benefits
In my conversations with patients who have ADHD, one theme comes up again and again:...
Other Mental Health Topics & News 9 mins read
What is Evidence-Based Practice in Mental Health?
I want to talk about the importance of what we in the mental health field...
Join our Newsletter
Newsletters Updated Quarterly
Download Our Newsletters & PDFs
We’ll never sell your information. Opt-out any time.