top of page

Melatonin vs. Magnesium: Which Works Better for Sleep?

Updated: 3 days ago

Key Takeaways:

  • Melatonin is effective for regulating the body clock, but it's only available on prescription in the UK and is best suited for jet lag and circadian rhythm disorders.

  • Magnesium is available over the counter, supports relaxation and deeper sleep, and is ideal for anxiety-related insomnia or general sleep troubles.

  • For most people in the UK, magnesium is the more practical and accessible choice for improving sleep, especially when melatonin isn’t available.


In the search for a good night's sleep, two supplements frequently rise to the top: melatonin and magnesium. Both are widely available in the UK and marketed as natural remedies for insomnia, jet lag, and general sleep disturbances. But they work very differently, and understanding those differences could be the key to finding a solution that truly works for your body.


This guide dives deep into the science, safety, timing, and effectiveness of melatonin and magnesium, offering a clear comparison so you can decide which supplement might be the better choice for improving your sleep quality.


Capsules on leaves and pills from a melatonin bottle on a blue background. The bottle label features a starry design.

What Is Melatonin?

Melatonin is a hormone naturally produced by the pineal gland in the brain. Its primary role is to regulate the sleep-wake cycle, also known as the circadian rhythm. Melatonin levels typically rise in the evening, peaking during the night, and decrease towards morning.


In supplement form, melatonin is often used to:

  • Treat jet lag

  • Aid sleep in shift workers

  • Help with delayed sleep phase disorder

  • Support sleep in people with insomnia or ADHD


However, in the UK, melatonin is not available over the counter. It is generally prescribed for short-term use, especially in people over 55 or in children with neurodevelopmental disorders.


How Melatonin Works

Melatonin works by signalling to the brain that it is time to sleep. It does not knock you out like a sedative but rather nudges your biological clock into alignment with nighttime.


What Is Magnesium?

Magnesium is an essential mineral involved in over 300 biochemical reactions in the body, including nerve transmission, muscle relaxation, and mood regulation. One of its lesser-known but highly impactful roles is in supporting sleep.


Magnesium can be obtained from dietary sources such as:


  • Green leafy vegetables

  • Nuts and seeds

  • Whole grains

  • Dark chocolate


In supplement form, magnesium is often used for:

  • Reducing muscle cramps and tension

  • Easing anxiety

  • Supporting deep, restorative sleep

  • Helping with restless legs syndrome


Types of Magnesium for Sleep

Different forms of magnesium have different effects. For sleep, the most commonly recommended types are:


  • Magnesium glycinate – for calming effects and anxiety relief

  • Magnesium citrate – well absorbed, may have a mild laxative effect

  • Magnesium threonate – can cross the blood-brain barrier


The Science: What Does the Research Say?


Melatonin

Multiple studies have shown that melatonin can be effective for:

  • Reducing sleep latency (time to fall asleep)

  • Regulating circadian rhythm disorders

  • Jet lag and shift work sleep disorders


According to a meta-analysis published in PLOS One (2013), melatonin reduced the time to fall asleep by an average of 7 minutes and improved overall sleep quality in people with insomnia. However, its effectiveness is modest compared to prescription sleep aids.


Magnesium

A 2012 randomised clinical trial in the Journal of Research in Medical Sciences found that magnesium supplementation improved sleep time, sleep efficiency, and sleep onset latency in elderly people with insomnia.


Magnesium has also been shown to:

  • Increase GABA (a calming neurotransmitter)

  • Lower cortisol levels (the stress hormone)

  • Support muscle relaxation and reduce twitching at night


Effectiveness: Head-to-Head Comparison

Feature

Melatonin

Magnesium

Primary Role

Regulates circadian rhythm

Supports relaxation and sleep quality

Works Best For

Jet lag, shift work, delayed sleep

General insomnia, anxiety, RLS

Onset Time

30 minutes to 2 hours

1–2 weeks of regular use

Natural Sources

Produced by the body

Found in leafy greens, nuts, seeds

Available OTC in the UK?

No (prescription only)

Yes

Safe for Long-Term Use?

Not recommended for prolonged use

Generally safe with appropriate doses

Children Use

Prescribed in specific cases only

Generally safe with medical advice

Safety and Side Effects


Melatonin

Common side effects:

  • Headache

  • Drowsiness

  • Dizziness

  • Short-term mood changes


Melatonin is generally considered safe for short-term use, but long-term safety data is lacking. It may interact with blood thinners, contraceptives, and diabetes medications.


Magnesium

Common side effects:

  • Stomach upset (especially with magnesium oxide)

  • Diarrhoea at high doses


Magnesium is generally safe for most people. However, those with kidney disease should consult a doctor before supplementation, as excess magnesium can accumulate in the body.


Timing and Dosage


Melatonin

  • Dose: 0.5 to 5 mg typically, lower doses often more effective

  • Timing: 30 minutes to 2 hours before bedtime

  • Prescription required in the UK


Magnesium

  • Dose: 200–400 mg of elemental magnesium

  • Timing: 1–2 hours before bedtime

  • Over-the-counter availability in the UK


Which Should You Choose?

  • Melatonin is best for people with circadian rhythm issues, such as jet lag, shift work, or delayed sleep phase.

  • Magnesium is a better all-rounder, especially for anxiety-related insomnia, muscle tension, and restless nights.


If falling asleep is the problem due to stress or physical restlessness, magnesium may be a better first step.


Popular Products Available in the UK

  • BetterYou Magnesium Sleep Lotion – Combines magnesium with lavender and chamomile

  • Nature’s Best Magnesium 375 mg – High-strength tablet suitable for daily use

  • Cytoplan Magnesium Glycinate – Gentle on the stomach, ideal for sleep support


  • Vitabiotics Sleepnite – Includes 5-HTP, chamomile, and valerian root

  • Kalms Night Tablets – Herbal remedy with valerian root, suitable for short-term insomnia


Final Verdict: Melatonin vs. Magnesium

There is no one-size-fits-all answer. The best supplement depends on the underlying cause of your sleep issue:


  • For body clock misalignment: Melatonin (under medical supervision)

  • For stress, anxiety, or muscle-related sleep issues: Magnesium


Both have a role in supporting better sleep — and for some, a combination of magnesium with other sleep-promoting ingredients may be the most sustainable option.


Conclusion

Both melatonin and magnesium offer sleep benefits, but they serve different functions. Magnesium supports the body in relaxing and preparing for sleep naturally, while melatonin acts as a timekeeper for the body’s internal clock.


For UK residents without access to melatonin prescriptions, magnesium is a more accessible and generally safe supplement to start with, especially when combined with good sleep hygiene and lifestyle adjustments.



FAQs


Is it safe to take magnesium and melatonin together?

Yes, in most cases. However, always check with a healthcare provider if you are on other medications or have health conditions.

Can I take magnesium every night?

Why is melatonin not sold over the counter in the UK?

Which is better for anxiety-related sleep problems?

How long does it take for magnesium to work for sleep?

Note: This article is for informational purposes only and should not be taken as medical advice. Always consult a GP or pharmacist before starting any new supplement.

Comments


bottom of page