Medication & supplements
Magnesium for Restless Legs: Does It Help?
By Angus Munro, Clinical Psychologist (AHPRA PSY0001626434) · Last clinically reviewed 2026-07-10 · 10 min read
Magnesium for restless legs is one of the most common self-remedies people reach for when their legs feel twitchy, crawly, or impossible to settle once the lights go out. The honest position is this: magnesium is inexpensive, low-risk for most people at sensible amounts, and reasonable to try, but the direct evidence that it fixes genuine restless legs is limited and mixed. And if restless legs are the thing wrecking your sleep, the more useful first move is finding out what is actually driving them, rather than reaching for one more thing off the shelf.
You have probably already tried magnesium, or you are about to, so let me walk you through what it can and can't reasonably do, when restless legs are worth getting properly assessed, and where the prescription options sit if the problem has already pushed you toward sleeping tablets.
Does magnesium actually help restless legs?
Here is the grain of truth. Magnesium is genuinely involved in nerve and muscle function, deficiency is a real thing, and a low-risk experiment that might settle a twitchy leg is worth a try. None of that is nonsense.
The problem is the leap from "involved in muscle function" to "will fix your restless legs." The direct clinical evidence for magnesium in restless legs and nocturnal leg cramps is thin and inconsistent. Some people report real relief. Trials struggle to show a reliable effect above placebo. Both can be true at once, and neither makes you foolish for trying.
It helps to know the wider landscape. When the American Academy of Sleep Medicine reviewed the common over-the-counter sleep aids, it found the evidence too weak to recommend valerian, tryptophan, or melatonin for chronic insomnia (Sateia et al., 2017). Magnesium was not among the agents they formally assessed, so I won't pretend the guideline speaks to it directly. But it tells you something about the terrain: most gentle, off-the-shelf sleep remedies live in evidence-limited territory, and it is honest to place magnesium there too.
So my stance is not "don't bother." It is: try it if you like, at a sensible amount, without pinning your hopes on it, and check with a pharmacist first if you have kidney problems or take other medications. Keep it a low-stakes experiment. The moment a supplement becomes another thing you monitor every night, it has quietly joined the problem instead of solving it.
Which magnesium is best for sleep and leg cramps?
This is the question people spend the most time on, and it matters less than the marketing suggests.
The main practical difference between the common forms is how they sit with your gut. Magnesium glycinate, sometimes sold as bis-glycinate, is generally gentler and is the form most people reach for at night. Citrate and oxide are more likely to have a laxative effect, which is not what you want at 11pm. I've written separately about magnesium bis-glycinate for sleep if you want to go deeper.
I am deliberately not giving you a dose. The right amount depends on you, on what else you take, and on your kidney function, and that is a two-minute conversation with a pharmacist rather than a number from a blog. Chasing the "perfect" form and dose is usually a sign the search itself has become the ritual. Pick a sensible form, give it a fair run, and don't let it become the new thing you lie awake grading.
When restless legs are more than restlessness
This is the part I most want you to hear. Some restless legs are just a wired body at the end of an overstimulating day. But there is a recognised neurological condition, restless legs syndrome, worth taking seriously and worth getting properly assessed, because chasing it with magnesium and sleep tips can waste months if that is what is going on.
I am not going to diagnose you from a web page, and you shouldn't self-diagnose either. But there are patterns worth mentioning to your GP: a genuine urge to move the legs, an uncomfortable crawling or pulling sensation, relief when you move and a return when you rest, and symptoms clearly worse in the evening and at night. Restless legs syndrome is sometimes linked to things a doctor can actually measure and address, including iron levels, so it rewards a proper look rather than a supplement guess.
Getting assessed is not about handing your problem to someone else. It is about not spending your energy on the wrong tool. If there is a specific, treatable driver, you want it found. If there isn't, you can stop chasing a medical cause and turn to the sleep itself, which is usually where the real leverage is anyway.
What about prescription sleeping tablets? Zopiclone vs eszopiclone
When restless nights go on long enough, many people end up asking their doctor about prescription sleeping tablets, and the two names that come up most often are zopiclone and eszopiclone. Here is the honest comparison, then the caveat that matters more.
Eszopiclone is essentially the refined, single-isomer version of zopiclone, the active half of the same molecule, and it is not marketed in every country. Both are "z-drugs," the non-benzodiazepine hypnotics. In the largest network meta-analysis of insomnia medications, 154 trials across more than 44,000 adults, eszopiclone came out with one of the more favourable balances of effectiveness and tolerability for short-term use, while zopiclone and the older benzodiazepines sat lower (De Crescenzo et al., 2022). On paper, that favours eszopiclone.
But the effect is modest. When researchers pooled the regulatory trial data on z-drugs, they reduced measured time-to-fall-asleep by only around 22 minutes versus placebo, and a large share of even that was a placebo response (Huedo-Medina et al., 2012). That is why the peak guidelines make only weak, conditional recommendations for individual hypnotics, on low-quality evidence, and stress short-term use and shared decision-making with your prescriber (Sateia et al., 2017). The European guideline is more pointed still: it names psychological treatment as first-line and says z-drugs and benzodiazepines should be used only when that is ineffective or unavailable, and then generally for no more than four weeks, because tolerance can build within days to weeks (Riemann et al., 2023).
The risks aren't trivial, particularly with age. In adults over 60, sedative hypnotics produced only a small improvement in sleep quality while roughly doubling to quadrupling adverse events, including next-day cognitive and psychomotor impairment and daytime fatigue (Glass et al., 2005). That is not an anti-medication argument. It is the information you need for a genuine conversation.
One plain safety line, because it belongs here. If you are taking a sedating sleeping tablet, next-day drowsiness is real. Don't drive or operate machinery until you know how it affects you.
Which one is right, if either, is a decision for you and your prescriber, weighing your age, your other medications, and how you have responded before. My job is to keep the fear-story and the treatment plan from getting tangled. Wanting to sleep is not the same as needing a particular pill, and being offered one is not a verdict on how broken you are.
Coming off sleeping tablets: what a taper conversation looks like
Many people reading this are not deciding whether to start. They are quietly wondering how to stop. I won't give you a schedule or doses, because that genuinely is your prescriber's territory, but I can tell you what a good conversation looks like.
The first principle is that you don't do this abruptly or alone. The deprescribing guidelines recommend offering a slow, supervised taper to older adults and to anyone who has used these medications beyond about four weeks, because a gradual reduction improves the odds of stopping without serious harm (Pottie et al., 2018). The second is that stopping goes far better when the behavioural side is supported at the same time. In one trial of long-term older users, combining a supervised taper with structured sleep therapy left about 85% medication-free, against roughly half for tapering alone (Morin et al., 2004). The tablet was never doing the whole job, so removing it works best when something more durable takes its place.
And the conversation is one you are allowed to start. When older long-term users were simply mailed plain-language information about tapering, about 27% had discontinued at six months, against 5% who got usual care (Tannenbaum et al., 2014). You do not have to wait to be offered the door.
The bigger picture: treating the sleep, not just the legs
Step back and notice the pattern under all of this. Magnesium, the "best" form, the right z-drug, the perfect supplement stack: each is a search for the one input that finally fixes the output. For restless legs with a clear medical driver, that search can pay off, which is exactly why getting assessed matters. But for the ordinary, wired-and-can't-settle version of sleeplessness, the search itself is part of the machinery keeping you awake.
This is the piece most sleep advice misses. Sleep hygiene, better magnesium, a cooler room: these are the floor, the baseline conditions, not the treatment. They were never designed to resolve a nervous system that has learned to treat bedtime as a problem to solve. The variable that actually moves is your arousal, and effort is the one thing that reliably pushes it the wrong way.
That is the mechanism our program is built to address. It is grounded in cognitive behavioural therapy for insomnia, the most strongly evidenced approach there is, and then adapted for the anxiety-and-hyperarousal version of the problem, which is why it does not lean on nightly sleep diaries: the constant monitoring feeds the very vigilance we are trying to lower. There is one more reason generic advice fails so often. It hands you a single tool and expects it to work at every level of arousal, when a calm-minute strategy is useless the moment you're already wired. The program's arousal-matched approach fits the tool to how activated you already are, which is a different thing entirely.
Before you change anything, start with the Sleep Clarity quiz to see which pattern you are actually in. It is not a diagnosis. It is a way to see the loop you are stuck in, so you can stop treating a whole-body pattern as a problem with your legs. You can read more about the wider picture of insomnia and how your circadian rhythm fits in once you know where you stand.
Frequently asked questions
Does magnesium help you sleep, or just the legs?
Both claims sit on limited evidence. Magnesium is low-risk to try at sensible amounts, and some people notice a calmer body at night, but the direct clinical evidence for magnesium as a sleep aid or a restless-legs fix is thin and mixed. Treat it as a low-stakes experiment, not the answer, and don't let tracking whether it "worked" become another source of vigilance.
Which is better, eszopiclone or zopiclone?
Eszopiclone is the refined single-isomer form of zopiclone and, in the largest comparison of insomnia drugs, showed a somewhat more favourable balance of effectiveness and tolerability for short-term use (De Crescenzo et al., 2022). But both are modest in effect and recommended only briefly, so which is appropriate, if either, is a decision for you and your prescriber rather than a clear winner.
Can I just buy magnesium, or do I need to see someone?
Magnesium is available over the counter and is low-risk for most people, so a sensible-amount trial is generally fine. Check with a pharmacist first if you have kidney problems or take other medications. See your GP if restless legs are genuinely disrupting your sleep, so a treatable cause is not missed.
How do I know if it's restless legs syndrome and not just being wired?
You don't know from home, and neither do I, which is the honest answer. A strong urge to move the legs, an uncomfortable crawling sensation, relief on movement, and a clear evening-and-night pattern are worth raising with your GP. Getting it assessed is about not spending months on the wrong tool.
Is it safe to take magnesium with sleeping tablets?
That is a question for your prescriber or pharmacist, not a blog, because it depends on the specific tablet, the dose, and your other medications. Bring it up directly. Combining a sedating hypnotic with anything else that affects alertness is exactly the kind of thing worth checking rather than assuming.
Frequently asked questions
Does magnesium help you sleep, or just the legs?
Both claims sit on limited evidence. Magnesium is low-risk to try at sensible amounts, and some people notice a calmer body at night, but the direct clinical evidence for magnesium as a sleep aid or a restless-legs fix is thin and mixed. Treat it as a low-stakes experiment, not the answer, and don't let tracking whether it "worked" become another source of vigilance.
Which is better, eszopiclone or zopiclone?
Eszopiclone is the refined single-isomer form of zopiclone and, in the largest comparison of insomnia drugs, showed a somewhat more favourable balance of effectiveness and tolerability for short-term use (De Crescenzo et al., 2022). But both are modest in effect and recommended only briefly, so which is appropriate, if either, is a decision for you and your prescriber rather than a clear winner.
Can I just buy magnesium, or do I need to see someone?
Magnesium is available over the counter and is low-risk for most people, so a sensible-amount trial is generally fine. Check with a pharmacist first if you have kidney problems or take other medications. See your GP if restless legs are genuinely disrupting your sleep, so a treatable cause is not missed.
How do I know if it's restless legs syndrome and not just being wired?
You don't know from home, and neither do I, which is the honest answer. A strong urge to move the legs, an uncomfortable crawling sensation, relief on movement, and a clear evening-and-night pattern are worth raising with your GP. Getting it assessed is about not spending months on the wrong tool.
Is it safe to take magnesium with sleeping tablets?
That is a question for your prescriber or pharmacist, not a blog, because it depends on the specific tablet, the dose, and your other medications. Bring it up directly. Combining a sedating hypnotic with anything else that affects alertness is exactly the kind of thing worth checking rather than assuming.
Work on the mechanism, not another tip
Insomnia Reset is a structured, psychologist-designed program for exactly this pattern. If you're ready to work on the mechanism rather than chase another tip, that's what it's for.
Explore Insomnia Reset →