Magnesium has become the default answer to bad sleep, recommended in every comment section and stocked in a dozen bedtime formulations. The enthusiasm is understandable: magnesium genuinely participates in the body's calming systems, and the supplement is cheap and largely safe. But popularity has outrun the trial data by a distance. The honest question is not whether magnesium matters for sleep, it does, but whether swallowing more of it improves sleep in someone who is not short of it. The evidence says: sometimes, for some people, modestly. This article maps who those people are, which forms and doses make sense, and where magnesium honestly ranks against everything else you could do for your nights.
Why magnesium plausibly helps
The mechanism is real. Magnesium regulates GABA, the nervous system's main inhibitory neurotransmitter, moderates the stress hormone axis, and is involved in melatonin production; deficiency in animals produces disturbed, shallow sleep. Low magnesium status in humans associates with poorer sleep quality, higher stress reactivity and restless legs in some studies, and intake surveys suggest a meaningful minority of UK adults, particularly teenagers and older adults, run below recommended levels without knowing it. So a genuine shortfall can plausibly show up in your nights. The catch is the direction of the logic: correcting a shortage can help, but stacking extra magnesium on top of an adequate level has no clear mechanism to help further, and the trial literature reflects exactly that split.
What the trials actually show
The best-known randomised trial, in older adults with insomnia, found roughly 500 mg of magnesium daily for eight weeks improved sleep time, sleep efficiency and time to fall asleep versus placebo, alongside higher melatonin and lower cortisol. Systematic reviews pooling the small trials conclude cautiously: magnesium may reduce the time it takes to fall asleep by a modest margin, mostly in older adults, with low certainty because the studies are small, short and uneven. Observational work linking dietary magnesium to better sleep quality is consistent but cannot separate magnesium from the general healthiness of magnesium-rich diets. For younger adults with adequate diets and ordinary insomnia, direct trial support is thin. The fair summary: worthwhile odds if you are older, likely to run low, or both; a coin-flip adjunct otherwise.
Which form and what dose
Forms differ mainly in absorption and gut effect, not in magical properties. Magnesium glycinate is well absorbed and gentle on digestion, which is why it dominates sleep formulations; citrate is well absorbed with a mild laxative lean; oxide is cheap, poorly absorbed and the most laxative, better suited to constipation than sleep. Claims that glycinate's glycine content meaningfully sedates you at supplement doses outrun the evidence, though glycine itself has some small sleep trials at higher doses. On dose: UK guidance suggests intakes around 300 mg a day for men and 270 mg for women from all sources, and advises keeping supplemental magnesium at or below 400 mg a day, above which diarrhoea and cramping become common. Taking it in the evening is customary and harmless, though timing has never been shown to matter much. People with kidney disease should not supplement without medical advice, and magnesium can interact with some antibiotics and other medicines; space doses or ask a pharmacist.
Food first, honestly
The unfashionable route to magnesium adequacy is the reliable one: pumpkin seeds, almonds, cashews, spinach and leafy greens, black beans, wholegrains, oats and even dark chocolate all carry meaningful amounts. A handful of pumpkin seeds delivers roughly 150 mg; a serving of cooked spinach around 80 mg; a portion of black beans about 60 mg. Assembling the daily requirement from food is genuinely achievable rather than theoretical. Two practical advantages follow. Food sources arrive with the fibre, protein and micronutrients that supplements do not, and food cannot realistically overshoot into laxative territory. If your diet is already rich in these foods, a supplement has less room to help, which is itself useful information before you spend on one. If it is not, improving it fixes more than your magnesium, because the same foods carry most of the other nutrients chronically under-consumed in UK diets.
The sleep basics no supplement replaces
Whatever magnesium contributes, it is small next to the levers everyone already knows and under-uses: consistent sleep and wake times, caffeine confined to the morning, alcohol treated as the sleep-fragmenter it is, a dark cool bedroom, and daylight early in the day. For persistent insomnia, cognitive behavioural therapy for insomnia (CBT-I) has the strongest evidence of any intervention, ahead of every supplement and most medicines. A sensible experiment, if you want one: fix the basics for a month, then add magnesium glycinate or citrate within the safe dose range for four to eight weeks and judge honestly whether nights changed. If nothing moved, you have your answer and can stop paying for it. Persistent poor sleep despite good habits deserves a GP conversation rather than a bigger supplement stack.
The bottom line: magnesium is not a sleeping pill, and the trials do not pretend otherwise. It is a cheap, low-risk adjunct with modest evidence, best odds in older adults and anyone likely to run low, and no substitute for the boring fundamentals. Correct a shortfall, choose an absorbable form, stay within safe doses, and let a four-to-eight-week trial decide. For the wider picture on forms, see our guide to magnesium types and evidence, and for the habits that outperform every capsule, our sleep hygiene article.