Does magnesium help you sleep?
A little, in some people. Older adults with insomnia fell asleep about 17 minutes sooner in small trials. But most gave more than the 400mg a day the NHS says is unlikely to cause harm.
On this page

Does magnesium help you sleep?
A little, in some people. One review found three small trials in 151 older adults with insomnia. Pooling two of them, people on magnesium fell asleep about 17 minutes sooner than on a dummy pill.
Their total sleep went up by about 16 minutes, but that could have been chance. The reviewers rated the evidence low to very low quality.
| Who took part | What changed | The catch |
|---|---|---|
| 151 older adults with insomnia. Oxide or citrate, 320 to 729mg a day. | Fell asleep about 17 minutes sooner (two trials pooled). | Three small trials. Low to very low quality evidence. |
| 155 adults with poor sleep. Glycinate, 250mg a day for 4 weeks. | Insomnia scores fell a little more than on a dummy pill. | A small effect, based on how people rated their own sleep. |
| 100 adults aged 18 to 45. Threonate, 145mg a day for 6 weeks. | Felt poor sleep got in the way of their day less. | Paid for by the maker. A sleep tracking ring found no change. |
Sources: Mah 2021; Schuster 2025; Lopresti 2026
Think of these trials as blurry photos. They hint at a small effect, but not enough to say whether it will work for you.
The reviewers still noted that magnesium is cheap and easy to buy. So the trials may support trying it for insomnia.
Dummy pills help too. In sleeping pill trials, people on a dummy pill got nearly two thirds of the real drug’s benefit.
Your next step: check how much magnesium your tub gives you, using the scale further down.
What is the best magnesium for sleep?
Nobody can say yet. Each trial above tested one type against a dummy pill. None of them put two types side by side.
Glycinate has the biggest recent trial, and the university that ran it paid for it. The threonate trial was funded by the maker. The trials in older adults used the cheaper oxide and citrate.
Look past the name to the amount of magnesium itself. In the threonate trial, 2g of the product gave just 145mg of magnesium. In another trial, each 414mg oxide tablet held 250mg of magnesium.
Choosing between two types, or want help with constipation too? See glycinate vs citrate, threonate vs glycinate or taurate vs glycinate.
How much magnesium for sleep, and when?
Two of the three trials in older adults gave 500mg or 729mg a day. The NHS says 400mg or less a day from supplements is unlikely to cause any harm.
- 400 mg a day or belowNHS: unlikely to cause any harm.
- Above 400 mg a dayAbove the NHS line. Can cause diarrhoea.
Taking more than 400mg for a short time can cause diarrhoea. The NHS says there isn’t enough evidence to know what high doses do over a long time.
On timing, the glycinate trial gave 250mg 30 to 60 minutes before bed.
You may not need a tub at all. Adults aged 19 to 64 need 300mg a day for men and 270mg for women. The NHS says a varied diet should give you all you need, from foods like spinach, nuts and wholemeal bread.
Take more than one supplement? Add up the magnesium in all of them. More in can you take too much magnesium.
Can magnesium help with sleep and anxiety?
The glycinate trial didn’t find that. It also checked stress, and a short screen for anxiety and low mood. These showed no difference from the dummy pill.
People who ate less magnesium seemed to gain more sleep benefit. That was an extra check the trial wasn’t built for, so treat it as a hint.
Stress, anxiety and depression are among the most common causes of insomnia. A GP may offer CBT, a talking therapy that changes the thoughts and habits that keep you awake. See CBT for insomnia and magnesium for anxiety.
What else helps you sleep?
Your habits. The NHS says insomnia usually gets better by changing your sleeping habits.
Six NHS sleep habits to start tonight
- Wake up and get out of bed at the same time every day.
- Only go to bed when you’re sleepy.
- Relax for at least 1 hour before bed, for example with a bath or a book.
- Keep your bedroom dark and quiet. Curtains, an eye mask or ear plugs can help.
- Have no alcohol, tea or coffee for at least 6 hours before bed.
- Don’t nap in the day, and don’t sleep in after a bad night.
Source: NHS: insomnia
Still want to try magnesium? Give it a fair test, one change at a time.
A fair 4-week magnesium test
- 1
Ask first
The NHS says check with your doctor before taking anything for sleep.
- 2
Pick a dose
400mg a day or less, from all your supplements added up.
- 3
Time it
The glycinate trial used 30 to 60 minutes before bed.
- 4
Check at 4 weeks
Keep a sleep diary. The glycinate trial checked at 4 weeks.
Sources: NHS: insomnia; NHS: magnesium; Schuster 2025
A sleep diary beats memory for spotting a change. For more ideas, see sleep hygiene and how to fall asleep faster.
When to speak to a GP
The NHS advises seeing a GP if:
- Changing your sleeping habits has not helped your insomnia.
- You’ve had trouble sleeping for months.
- Your insomnia is affecting your daily life in a way that makes it hard for you to cope.
Also see a GP if your breathing stops and starts while you sleep, or you make gasping, snorting or choking noises in your sleep. Or if you always feel very tired during the day. These can be signs of sleep apnoea, and a GP may refer you to a sleep clinic.
Many medicines can cause insomnia (NHS), so if you think one is keeping you awake, ask your GP or pharmacist. Never stop or change a prescribed medicine without your prescriber. See also sleep apnoea and blood tests.