When counting sheep isn't working, can magnesium help with sleep?
Finding a sleep support that works can feel like an endless journey.
Written by Kaitlyn Wilson
Published Feb 24, 2026
4 min read
The advice to count sheep to fall asleep is believed to have been invented centuries ago, in a time before blue light, Netflix, TikTok and the inability to put down our phones.
Plus, we can't forget the everyday life stressors like work, kids and family that can influence your slumber and result in a bad night's sleep. Chances are you've tried a number of sleep remedies and have experienced little to no success.
It's frustrating and finding a sleep support that works can feel like an endless journey. But, have you tried taking magnesium before hitting the hay?
Before you buy a bottle of magnesium supplements, let's explore how magnesium works in the body and how it might be able to help your slumber.
What is magnesium?
Magnesium is an essential mineral for healthy bone, nerve and muscle function. It also helps in blood sugar and blood pressure regulation. While many foods are rich in magnesium, you can also find this mineral in the form of supplements as well as sprays, oils and bath salts.
There are a few different forms of magnesium, however, magnesium oxide, magnesium chloride and magnesium citrate are the ones most commonly used in magnesium supplements.
With over 300 functions in your body requiring magnesium, it's no wonder that low magnesium levels can lead to some pretty dire circumstances.
Not only can magnesium deficiency lead to low calcium and low potassium, but it can also cause headaches, nausea, vomiting, muscle weakness, fatigue, and loss of appetite, as well as more serious health conditions [1].
What are the health benefits of magnesium?
While sleep can be positively influenced by magnesium, this handy mineral has a number of other positives.
Some of the major health benefits of consuming enough magnesium include:
Improved energy and concentration
Central nervous system optimisation
Improved muscle movement and cardiovascular health
Decreased symptoms of mood disorders
Healthy blood sugar
Reduced inflammation which decreases the likelihood of disease
It can help prevent migraines
Promotes bone health
Improved gut health [2].
What is the recommended magnesium intake?
The recommended dose of magnesium changes depending on your age. Men under the age of 30 should consume around 400mg of magnesium per day, while men over 31 require around 420 mg a day [1].
Comparatively, women under 30 need less than men, with 310 mg per day the recommended daily dose and 350-360 per day for women over 30.
Are there any side effects of magnesium?
There are no risk factors associated with receiving the bulk of your magnesium from food. However, when it comes to magnesium supplements, there are a few side effects and too much magnesium can result in result in nausea, abdominal cramping and diarrhoea.
Magnesium supplements can also cause some adverse reactions when mixed with certain antibiotics and other medications such as antacids or laxatives. Always check with your healthcare provider before commencing magnesium supplementation, especially if you take regular prescriptions [1].
Magnesium for sleep: does it work?
Taking a magnesium supplement can improve your sleep cycle in a number of ways. Unfortunately, scientists aren't 100% how or why magnesium supplements can help with sleep regulation.
But, they do know that low levels of magnesium have been linked to poor sleep quality and sleep disorders such as insomnia.
In contrast, healthy magnesium levels have also been shown to decrease certain mental health symptoms, which are also associated with poor sleep.
In fact, studies have shown that 500mg of magnesium per night decreased symptoms of insomnia significantly with the supplemental magnesium helping participants: [5]
Experience less difficulty falling asleep
Increase their sleep efficiency (spending more time asleep at night)
Decrease excessive daytime sleepiness
Wake up less throughout the night
Produce less cortisol (stress hormone).
Taking a magnesium supplement can also help you sleep by reducing the symptoms of restless leg syndrome, a periodic limb movement disorder that often prevents restful sleep [5].
The science around why magnesium can help sleep is a little fuzzy and it's important to note that it isn't a silver bullet for slumber and those with more severe sleep issues may not find it overly impactful.
Can you take magnesium every night for sleep?
When given the go-ahead by your doctor, magnesium supplements are perfectly safe to take daily.
It's recommended to take your supplement 30 minutes before bed and only take the recommended amount — doubling your dosage won't increase the sleep benefits [5].
Maintaining healthy magnesium levels can also be achieved through your diet and you may want to add some of the following magnesium-rich foods to your plate going forward:
Seeds such as pumpkin and chia seeds
Nuts, including peanuts, almonds and cashews
Spinach
Wheat cereals and grains
Soy milk
Potato (with skin)
Brown and white rice
Plain yoghurt
Oatmeal
Full cream milk
Wholewheat bread
Broccoli
Beef and chicken
Carrots
Apples
Avocado [6].
Besides food and dietary supplements, you can also try using magnesium salts before bed or lathering your body in a magnesium-infused oil or body spray to help induce those sleepy feelings.
Take the guesswork out of sleep
While magnesium might work for some, it might not be making enough of a difference to your sleep routine. A staggering 1 in 3 Aussie men don't get enough sleep, which is why we want to help you get more of it.
If that's your case, Hims' sleep support may be right for you. Simply follow these steps for a good night's sleep:
Step 1: Have an online consultation with one of our resident sleep experts
Step 2: Have your custom sleep treatment plan delivered to your door
Step 3: Sleep like a baby
Photo credit: Getty Images
5 Sources
Kaitlyn Wilson
Related articles
Tongkat Ali: Can this traditional herb really boost testosterone?
Written by Marcel Deer
Published Jul 15, 2026

Boosting testosterone naturally: Does ashwagandha work?
Written by Emma Norris
Published Jun 17, 2026

Are libido supplements the answer to improving your sex life?
Written by David Sullivan
Published Jul 31, 2026



