You've tried the herbal tea, put your phone in another room and still found yourself awake at 2am. So you go looking for a supplement, and two names keep coming up: ashwagandha and magnesium. Both are sold as natural sleep aids, both are easy to buy in the US and UK, and both have fans who swear by them. They work in very different ways, though, and the research behind each one is not the same.
This guide compares ashwagandha vs magnesium for sleep using what the clinical trials actually found, adds the Ayurvedic view of why you can't sleep, and helps you work out which one (if either) makes sense for you.
Which is better for sleep, ashwagandha or magnesium?
For stress-driven insomnia, ashwagandha has the stronger evidence: a 2021 meta-analysis of five trials found a small but real improvement in sleep, mostly at 600 mg a day for eight weeks or longer. Magnesium has thinner evidence and seems to help most when your diet is low in magnesium. Neither replaces good sleep habits.
That short answer hides a useful detail. The two supplements suit different kinds of poor sleep, so the better question is why you're not sleeping.
How does ashwagandha help you sleep?
Ashwagandha (Withania somnifera) is an adaptogen, a herb used in Ayurveda to help the body cope with stress. It isn't a sedative. It doesn't knock you out the way a sleeping pill does. Instead, people tend to notice that they wind down more easily and wake up less often over several weeks.
The best summary of the research is a 2021 systematic review and meta-analysis in PLOS ONE by Cheah and colleagues. It pooled five randomized controlled trials with 400 adults. Ashwagandha extract had a small but significant effect on overall sleep, and the effect was larger in three groups:
- adults who had been diagnosed with insomnia
- people taking 600 mg a day or more
- trials that lasted at least eight weeks
The same review also noted improvements in mental alertness on waking and in anxiety. If daytime focus is your bigger worry, see our guide to the best Ayurvedic herbs for brain fog and focus. The authors were clear that data on serious side effects is limited and that more safety data is needed before calling it safe for long-term use.
In Ayurveda, ashwagandha is a classic remedy for Vata imbalance, the restless, airy pattern that shows up as racing thoughts, light sleep and waking in the early hours. If that sounds familiar, our guide to Vata imbalance and anxiety explains the pattern in more detail. Warm, grounding meals help too, as explained in our Vata diet guide.
How does magnesium help you sleep?
Magnesium is a mineral, not a herb. Your body uses it in hundreds of processes, including the nerve signalling involved in relaxation. Many people don't get enough from food. According to the NIH Office of Dietary Supplements, roughly half of Americans take in less magnesium than they need from diet alone.
The sleep research is mixed. One frequently cited trial in older adults with insomnia found that 500 mg of magnesium a day improved sleep efficiency, total sleep time and how quickly people fell asleep, compared with placebo. But most studies are small, and sleep specialists at the Cleveland Clinic describe the overall evidence as thin. The benefit seems clearest in people who were low in magnesium to begin with.
The form matters. Magnesium glycinate is usually gentler on the stomach. Magnesium citrate absorbs well but has more of a laxative effect, and magnesium oxide is cheap but poorly absorbed.
Ashwagandha vs magnesium: side-by-side comparison
| Ashwagandha | Magnesium | |
|---|---|---|
| What it is | Ayurvedic adaptogenic herb (root extract) | Essential dietary mineral |
| Best suited to | Stress, anxiety and a busy mind at night | Low dietary magnesium, muscle tension, restless legs |
| Strength of sleep evidence | Small but significant effect in a meta-analysis of 5 trials | Limited; a few small trials, mostly in older adults |
| Dose used in studies | Often 300 to 600 mg extract a day; 600 mg showed bigger effects | Varies; US upper limit for supplements is 350 mg a day |
| How fast it works | Gradually, over several weeks | Some notice changes within days to weeks |
| Common side effects | Stomach upset, drowsiness; rare liver injury reported | Loose stools, nausea, cramps at higher doses |
| Avoid or check first if | Pregnant, liver disease, thyroid or autoimmune condition, on sedatives | Kidney disease, taking certain antibiotics or osteoporosis drugs |
How much ashwagandha or magnesium should you take for sleep?
Most ashwagandha sleep trials used a standardized root extract at 300 to 600 mg a day, often split into two doses or taken in the evening. The larger sleep benefits appeared at 600 mg taken for eight weeks or more. Before you commit to a daily habit, read our guide on how much ashwagandha is safe to take daily, which covers side effects and who should skip it.
For magnesium, the NIH sets the tolerable upper limit for adults at 350 mg a day from supplements. Magnesium from food doesn't count toward that limit. Going above it is the main cause of diarrhoea and stomach cramps. Many people start lower, around 100 to 200 mg of elemental magnesium in the evening, and only increase if they need to and tolerate it.
Can you take ashwagandha and magnesium together?
Many people do, and there's no well-known direct interaction between the two. Still, it's smarter to start one at a time. If you begin both on the same night and sleep better (or get an upset stomach), you won't know which one caused it. Give one supplement two to three weeks before adding the other, and check with your doctor or pharmacist first if you take any regular medication.
What does Ayurveda say about poor sleep?
Ayurveda sees sleep (nidra) as one of the three pillars of health, alongside food and balanced energy. Trouble falling asleep is usually linked to Vata, while waking hot and alert around 2am is often linked to Pitta. Not sure which dosha is behind your sleepless nights? Take our free Ayurvedic dosha quiz. A supplement can help, but Ayurvedic practitioners would look at your evening routine first:
- Eat dinner earlier and lighter (a heavy late meal strains weak digestive fire), ideally two to three hours before bed.
- Dim the lights and step away from screens for the last hour of the day. Our Ayurvedic tips for screen fatigue can help.
- Try a warm foot massage with sesame oil (padabhyanga) before bed.
- Keep a regular bedtime, ideally before 10:30pm.
Traditionally, ashwagandha powder was taken in a cup of warm milk with a pinch of nutmeg at night. If you'd rather start with food than capsules, magnesium-rich options like pumpkin seeds, almonds, spinach and black beans fit well into a calming evening meal. Our full guide to natural remedies for insomnia covers a complete Ayurvedic sleep routine. You can build these habits into a morning-to-night Ayurvedic routine.
So which one should you choose?
If your sleep problems follow a stressful week and your mind won't switch off, ashwagandha is the better-studied option, as long as you don't fall into one of the groups that should avoid it. If you get muscle cramps, eat few nuts, seeds or leafy greens, or simply want something gentle, magnesium glycinate within the 350 mg limit is a reasonable first step.
And if stress is the real problem behind the sleepless nights, it's worth tackling that directly. Our page on Ayurvedic treatment for stress and anxiety is a good place to start.
See a doctor if poor sleep lasts more than a few weeks, if you snore loudly or stop breathing in your sleep, or if low mood comes with it. Insomnia can have medical causes that no supplement will fix.
Frequently asked questions
Is it better to take ashwagandha in the morning or at night for sleep?
For sleep, most people take it in the evening, about an hour before bed. Some trials split the dose between morning and evening. If it makes you drowsy during the day, move the whole dose to the evening.
How long does ashwagandha take to work for sleep?
Don't expect results the first night. In the 2021 meta-analysis, the clearer effects showed up in trials lasting eight weeks or longer.
Which magnesium is best for sleep?
Magnesium glycinate is a common choice because it's easier on the stomach. Magnesium citrate also absorbs well but can loosen stools.
Can I take magnesium every night?
Most healthy adults can, as long as supplements stay at or below 350 mg a day. People with kidney disease should only take magnesium under medical supervision.
Who should not take ashwagandha?
Avoid it if you are pregnant or breastfeeding or have liver disease. Talk to your doctor first if you have a thyroid or autoimmune condition, or take sedatives, thyroid, diabetes or blood pressure medicines.
References
- Cheah KL, et al. Effect of Ashwagandha (Withania somnifera) extract on sleep: a systematic review and meta-analysis. PLOS ONE, 2021.
- NIH Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals.
- Cleveland Clinic. Does Magnesium Help You Sleep Better?
This article is for general information and is not a substitute for medical advice. Talk to a qualified healthcare provider before starting any supplement.