Skip to content
Cansu's ADHD Diary
All articles

Does Magnesium Help Sleep and Anxiety?

Magnesium is widely recommended for sleep and anxiety. What studies found, how strong the evidence is, whether it has been tried in ADHD and who should be careful.

Cansu11 min readLong

Türkçe okuShare on Reddit

Short answer

The evidence is limited.

Longer answer

In the pooled result of three small studies with older adults with insomnia, magnesium shortened the time to fall asleep by about 17 minutes compared with placebo, but the quality of the evidence is low or very low. For anxiety there are also positive results in groups prone to anxiety, but the authors rate the quality of the studies as weak. I could not find a study testing magnesium for sleep or anxiety in people with ADHD. Magnesium does not replace a medication. Talk to your doctor or pharmacist before starting.

There is small, low-quality evidence that magnesium helps sleep and anxiety, but there is no direct evidence for someone with ADHD. In the pooled result of three small studies done with older adults with insomnia, those taking magnesium fell asleep about 17 minutes earlier than those taking placebo. For anxiety too, some of the studies done in groups already prone to anxiety gave positive results. In both areas, the people who wrote the reviews say the same thing: the studies are few, small and at high risk of bias.

I explained what is known about magnesium for ADHD symptoms, its lab test and taking too much of it in the magnesium, zinc and iron article. Here I am looking only at sleep and anxiety, because on social media magnesium circulates most with these two promises.

Why is magnesium talked about for sleep and anxiety?

Magnesium is a mineral involved in the work of a great many enzymes in the body. Boyle and colleagues begin their 2017 review from the observation of a link between magnesium levels and the anxiety people report, and build from there the idea that supplementation could ease anxiety symptoms. The 2024 review by Rawji and colleagues also reports that laboratory and animal studies have seen connections between magnesium status and sleep quality and anxiety. The same authors write that magnesium is popular for anxiety and insomnia, especially on social media, but that how far these claims rest on evidence is unclear.

These are the answers to the question "why is it worth trying?" A mineral having a job in the cell does not show that sleep or anxiety will change when you take it from a bottle. The way to show that is to compare, blindly, people taking magnesium with people taking a placebo that looks the same. The sections below are about studies of this kind.

Does magnesium speed up falling asleep?

The study that gives the most organized answer to this question is the 2021 meta-analysis by Mah and Pitre. The authors screened studies comparing oral magnesium with placebo for insomnia in older adults and found three randomized trials. The authors counted a study as one in "older adults" when most of its participants were 55 or older. According to the paper, a total of 151 people from three different countries had taken part in these studies. But the numbers for the three studies in the paper's table (46, 12 and 100) add up to 158, and the paper does not explain the difference. One of the studies was from Iran and was done with 46 volunteers aged 60-75 with insomnia.

The details of the three studies differ quite a lot from one another. The Iranian study lasted eight weeks, and there is an interesting detail in its exclusion criteria: people whose magnesium intake from food exceeded three quarters of the recommended amount and whose serum magnesium was above a certain level were not included in the study. So this study was done with older people whose magnesium was already relatively low. The study in Germany was carried out with 12 healthy older volunteers, in a crossover design and with sleep EEG. The study in the US was attended by 100 adults with an average age of 59 who were found to sleep poorly on a sleep quality questionnaire, and it too lasted eight weeks. Two different forms of magnesium were used in the studies, and the follow-up period was between 20 days and eight weeks.

This detail takes on meaning when read together with the Rawji review's emphasis on "those with low magnesium at the start". Even if there is an effect, these studies do not show that it would be seen to the same degree in someone whose magnesium is adequate.

In the pooled result, the time to fall asleep was 17.36 minutes shorter in those taking magnesium compared with placebo. Total sleep time was about 16 minutes longer in the magnesium group, but this difference was not statistically significant. All three of the studies carried a moderate to high risk of bias, and the results were supported by low- or very low-quality evidence.

The conclusion the authors reached has two parts. On the one hand, the quality of the research is too weak for doctors to make a sound recommendation. On the other hand, because magnesium is cheap and easy to find, they see the small positive signal from the randomized trials as an option. When I read this second part, I also remember this: these studies were done in older people. With the participants' age and the type of sleep problem being so different, we do not know how far this result can be carried over to someone who is 30, has ADHD and is still awake at two in the morning.

What did more recent sleep studies find?

The 2024 systematic review by Rawji and colleagues screened intervention studies done with magnesium for sleep and anxiety and found 15 studies that met its criteria. Of the eight studies measuring sleep outcomes, five reported improvement in sleep measures, two found no improvement and one gave mixed results. The authors also list the things that make it hard to reach a firm conclusion: most of the studies had few participants, the amounts, forms and durations used differed from one another, and some included other substances alongside magnesium that might have an effect.

I think the conclusion this review reaches is a little ahead of where the data allow. After listing the limitations, the authors say that because the results are generally positive and side effects are few, magnesium is most likely beneficial in mild anxiety and insomnia, especially in those with low magnesium at the start. In the same paragraph they also add that larger randomized trials are needed. I give more weight to the "larger studies are needed" part than to the "most likely beneficial" part.

One of the individual studies, the 2024 study by Hausenblas and colleagues, is worth looking at separately because it is talked about often. Eighty adults aged 35-55 who complained about their sleep took magnesium L-threonate or placebo for 21 days. Sleep was measured with questionnaires and with a sleep ring worn on the finger. In the magnesium group, the ring's deep sleep and REM sleep scores, and the scores for behavior on waking in the morning, energy, daytime productivity and mood, came out better than with placebo. According to the authors, the magnesium group maintained good sleep quality while the placebo group declined. But three of the authors are affiliated with a company, and the paper's copyright also belongs to that company. The study lasted only three weeks, and the measuring device was a consumer product. This study seems to me an interesting signal, not a solid answer.

Does magnesium reduce anxiety?

The 2017 systematic review by Boyle and colleagues examined 18 studies in which magnesium was given alone or together with at most five other substances. All of the studies had been done with groups already prone to anxiety: people with mild anxiety, women with premenstrual syndrome, women in the postpartum period and people with high blood pressure.

The results varied by group. Four of the eight studies in anxious samples, four of the seven studies in premenstrual syndrome and one of the two studies in people with high blood pressure reported a positive effect of magnesium on self-reported anxiety. There was no effect on postpartum anxiety. No study had used a validated stress scale as an outcome measure. According to the authors, the existing evidence suggests a positive effect in groups prone to anxiety, but the quality of the evidence is weak and well-designed randomized trials are needed. One of the authors was on the consumer health advisory board of a pharmaceutical company during the review. It is stated that the company had no role in the review.

In the Rawji review too, five of the seven studies measuring anxiety outcomes reported improvement in self-reported anxiety. Of the two anxiety studies that came out negative, one was done with women with premenstrual symptoms and the other with women in the postpartum period. The authors think hormones may have contributed to the symptoms in these groups.

Here you need to pay attention to the word "anxiety". Most of these studies measured not a diagnosed anxiety disorder but mild anxiety or anxiety related to a particular period. I explained where anxiety in ADHD comes from and how ADHD and anxiety disorders get mixed up in the ADHD and anxiety article. Starting a supplement "for my anxiety" without making that distinction does not seem right to me.

Has magnesium been tried for sleep or anxiety in someone with ADHD?

I could not find a randomized trial in people with ADHD that tested magnesium for sleep or anxiety as its main question. None of the sleep and anxiety studies above were done with participants with ADHD.

The study closest to this question is from Iran. In 2021, Hemamy and colleagues divided 66 children with ADHD into two groups: one group was given vitamin D and magnesium together for eight weeks, and the other a placebo. Mental health was measured with a strengths and difficulties questionnaire, and in the supplement group emotional problems, conduct problems and the total difficulties score decreased more than with placebo. This study did not measure sleep, did not give magnesium alone, and the authors write that larger studies are needed. The details of this study, in which the two substances were given together, belong to the vitamin D discussion. The conclusion "magnesium reduced anxiety in children with ADHD" cannot be drawn from it.

Then there is the level side. In the 2019 meta-analysis by Effatpanah and colleagues, according to the pooled result of seven studies, serum magnesium was slightly lower in people with ADHD than in controls, but the difference between studies was very large. The authors of the Rawji review think magnesium may work best in those who are low at the start. Putting these two findings side by side and saying "people with ADHD have low magnesium, so they should take magnesium for their sleep" would be stacking two separate uncertainties on top of each other.

Does magnesium fit the sleep problem in ADHD?

The most common sleep complaint in ADHD is not being able to fall asleep, and behind it there is often a backward shift of the body clock, that is, delayed sleep phase. Someone who cannot find time for themselves during the day stretching out the night also plays a part. I wrote about these in detail in the ADHD and sleep article. If you take stimulant medication, one of the most important factors delaying sleep can be the timing of the dose. I explained this too in the ADHD medication and insomnia article.

The participants in the magnesium studies, on the other hand, were mostly older people with insomnia or middle-aged adults unhappy with their sleep. I could not find a study showing that magnesium shifts the body clock earlier. The 17-minute difference in the Mah meta-analysis may be meaningful for someone whose clock is steady but who struggles to fall asleep, but it may not mean the same for someone whose body clock has shifted by two hours.

The most studied supplement for difficulty falling asleep in ADHD is melatonin, and it has been tested in randomized trials in children with ADHD. I wrote about its details and limits in the melatonin article. In my view, the order should be this: first a regular wake-up time, morning light and sleep hygiene, then, if you take medication, looking at the timing of the dose with your doctor, and then, if needed, an option that has been studied in ADHD. Magnesium sits on this list with the note "not tested in ADHD".

Does magnesium have side effects, and who should be careful?

According to the NHS vitamins and minerals page, high-dose magnesium can cause diarrhea in the short term. There is not enough evidence to say what the effect of long-term high-dose use is. The NHS also states that most people can get the magnesium they need from a varied and balanced diet. In one of the studies in the Mah meta-analysis, softer stools were seen in all of the participants; the other studies reported no unwanted effects. In the Hausenblas study, magnesium was well tolerated.

All of these studies lasted between a few weeks and a few months. They do not show what happens with long-term use.

Situations that call for care:

  • People taking other medications or minerals. According to the NHS, products containing magnesium can affect how iron medicine works. Some stomach medicines also contain magnesium. I explained the details in the medication section of the magnesium, zinc and iron article. Telling your pharmacist about the medicines you use is the easiest way.
  • People with a chronic illness. If you have a condition that affects mineral balance, such as kidney disease, ask your doctor before starting.
  • Pregnant and breastfeeding women. None of the sleep and anxiety studies I read tested magnesium for sleep during this period. The decision should be made with a doctor, and I wrote separately about melatonin in this period.
  • Children. The sleep and anxiety studies were done in adults. You can find the first steps for sleep in children in the sleep in children with ADHD article.

Magnesium does not replace medication. If you are being treated for an anxiety disorder or a sleep disorder, do not make the decision to stop the treatment and switch to magnesium on your own; talk about it with the doctor managing your treatment.

What I take from this

The sleep and anxiety evidence for magnesium seems to me a good example: every review sees a small, positive signal, and every review says in the same breath that the evidence is weak. These two need to be held together. Neither saying "it doesn't work" nor being as sure as social media is right.

For someone with ADHD, my main objection is that these studies have not tested sleep and anxiety in ADHD. I do not carry over as they are the results of studies done with insomnia in older people, premenstrual anxiety or adults with mild anxiety to someone whose body clock has shifted and whose mind is still switched on late at night.

If I were you, for sleep I would first deal with my wake-up time, my evening coffee and the timing of my medication. For anxiety, I would first talk about where the anxiety comes from, whether it is a consequence of ADHD or a separate condition. If after all this I wanted to try magnesium, I would tell my doctor, change a single variable and set an end date. Being cheap and relatively safe does not make it a solution. At most, it makes it an option that can be tried when its turn comes.

Frequently asked questions

Can magnesium be used instead of melatonin?
I could not find a study comparing the two. Melatonin has been tested in randomized trials for difficulty falling asleep in children with ADHD, whereas magnesium has not been tested for this purpose in ADHD. We do not know what magnesium would do in a sleep problem where the body clock has shifted.
Does magnesium help sleep that has been disrupted by ADHD medication?
There is no study that tested this. With medication-related difficulty falling asleep, the first thing discussed is usually the timing of the dose and the type of medication. Putting magnesium in place of this conversation may cause the real cause of the problem to be overlooked.
How long does it take for magnesium's effect on sleep to show?
The studies I read lasted between a few weeks and a few months, and the results were reported at the end of that period. I have not seen a study showing what happens in a single night or in the first few days. What happens with longer use is not clear either.
Can I give my child magnesium for their sleep or anxiety?
I could not find a study testing magnesium for sleep or anxiety in children. The sleep studies were done in adults, most of them in older people. In the only study done in children with ADHD, magnesium was given together with vitamin D. If you are thinking of giving it, ask a pediatrician first.
Which form of magnesium is better for sleep?
The studies used different forms, and I could not find a study directly comparing the forms in terms of sleep. The authors of a systematic review also write that the most effective form and amount are not yet known. You can ask your pharmacist about the differences in digestive tolerance.