Melatonin for better sleep: does it work, when to take it, and who it helps most
What melatonin can and can't do for your sleep: what the research shows, the best time to take it, jet lag and shift work, side effects, melatonin vs magnesium, and when to see a doctor.

Melatonin is often called a "sleep hormone", but it is not a sleeping pill. Knowing what it actually does helps you use it at the right time, for the right problem, and avoid disappointment. This guide explains how melatonin works, what the research shows, and how to take it for better sleep.
In short: melatonin tells your body clock that it is night. It helps most with jet lag, a body clock that runs late and shift work, and it can help you fall asleep a little faster. Take it 30 to 60 minutes before bed, in a dim room, for the short term. For long-standing insomnia, better sleep habits and treating the cause work better.
How melatonin works
As it gets dark, a small gland in the brain releases melatonin. It signals "night" to the rest of the body: body temperature drops a little and sleep becomes easier. Bright light, especially from phones and screens late at night, holds melatonin back. Taking melatonin gives your body that "night" signal at the time you choose, which is why timing matters more than dose.
Does melatonin work? What the research shows
- Falling asleep: a review of 19 trials with 1,683 people found melatonin helped people fall asleep about 7 minutes faster, sleep about 8 minutes longer, and rate their sleep quality a little better than a placebo. Longer use and higher doses gave slightly bigger effects.
- Jet lag: this is where the evidence is strongest. A Cochrane review found melatonin taken at bedtime at the destination reduces jet lag, especially when flying east across 5 or more time zones.
- Shift work: studies are small, but they suggest melatonin may help some people sleep a little longer during the day.
- Long-term insomnia: the American Academy of Sleep Medicine does not suggest melatonin as a treatment for chronic insomnia, because the benefit is small. Cognitive behavioural therapy for insomnia (CBT-I) and treating the cause come first.
So melatonin is a useful helper, not a knockout. Expect an easier time falling asleep and a steadier sleep time, not 8 hours guaranteed.
Who melatonin helps most
- travellers with jet lag;
- "night owls" whose body clock has drifted late, who cannot fall asleep before 1 or 2 am;
- shift workers who need to sleep at unusual times;
- people with short-term sleep problems, such as during a stressful week, who want to keep a regular sleep time.
When and how to take melatonin
- Take it 30 to 60 minutes before your planned bedtime. Most people feel sleepy within an hour.
- Take it at the same time every night to retrain your body clock.
- After taking it, dim the lights and put the phone down. Bright light cancels part of the effect.
- For jet lag, take it at bedtime in the new time zone, from the first night, for 2 to 5 nights.
- Use it for the short term. If you still need it after 3 to 4 weeks, see a doctor.
Side effects of melatonin
Most people take melatonin without problems in the short term. Possible side effects are drowsiness the next morning, headache, dizziness, vivid dreams and a mild upset stomach. Older adults are more likely to feel groggy the next day. Do not drive or operate machinery after taking it, and avoid alcohol, which also disturbs sleep. Melatonin is not known to cause the dependence that many sleeping pills do, but long-term safety has not been well studied.
Check with a doctor first if you are pregnant or breastfeeding, under 18, have epilepsy or an autoimmune condition, or take blood thinners, sedatives, diabetes or blood pressure medicines, or antidepressants.
Melatonin vs magnesium for sleep
They work differently. Melatonin shifts the timing of sleep. Magnesium is a mineral involved in muscle and nerve relaxation; a review of 3 small trials in older adults found it helped people fall asleep about 17 minutes faster, although the studies were of low quality. Magnesium glycinate is a form that is gentle on the stomach. Some people use both, which is why our CarePlus Sleep Support combines melatonin 5 mg with magnesium glycinate, L-tryptophan, zinc and vitamin B6 in one capsule.
Melatonin vs sleeping pills
Prescription sleeping pills, such as the "Z-drugs" and benzodiazepines, act on the brain's calming system. They are stronger, but they can cause dependence, memory problems and falls, and are only for short courses under a doctor's care. Melatonin is gentler and works with your body clock, so it suits timing problems more than severe insomnia.
Sleep habits that make melatonin work better
- Wake up at the same time every day, including weekends.
- Get daylight in the morning, and keep evenings dim.
- No caffeine after 2 pm, and avoid heavy meals and alcohol late at night.
- Keep the bedroom cool, dark and quiet, and use the bed only for sleep.
- If you cannot sleep after 20 minutes, get up and do something calm in dim light, then go back to bed.
When to see a doctor about your sleep
See a doctor if poor sleep lasts more than a month or affects your work or mood, if you snore loudly or stop breathing during sleep, if you feel very sleepy during the day, or if pain, low mood, worry, frequent urination at night or a medicine may be keeping you awake.
Getting melatonin in Malaysia
In Malaysia, melatonin is supplied through doctors and pharmacists. Read where to buy melatonin in Malaysia, or order CarePlus Sleep Support (melatonin 5 mg): our doctor reviews your answers before it is sent. Questions? WhatsApp us on +60 11-2615 1500.
11. Questions people ask
How long does melatonin take to work?
Most people feel sleepy within 30 to 60 minutes, so take it about an hour before your planned bedtime, in a dim room.
Does melatonin really help you sleep?
Modestly. In studies it helped people fall asleep about 7 minutes faster and sleep slightly longer. It works best for jet lag, a late-running body clock and shift work.
Can I take melatonin every night?
It is meant for short-term use. If you need it for more than 3 to 4 weeks, see a doctor to find and treat the cause of your poor sleep.
Is melatonin or magnesium better for sleep?
They work differently: melatonin resets the timing of sleep, while magnesium supports relaxation. Some people use both together.
Will melatonin make me groggy the next day?
Some people feel drowsy in the morning, especially older adults. Take it earlier in the evening, and tell a doctor if it persists. Do not drive if you feel drowsy.
Is melatonin addictive?
Melatonin is not known to cause the dependence that many sleeping pills do. It is still meant for short-term use, and long-term safety has not been well studied.
Sources
- Ferracioli-Oda E, Qawasmi A, Bloch MH (2013): Meta-analysis: melatonin for the treatment of primary sleep disorders. PLOS ONE
- American Academy of Sleep Medicine (2017): Pharmacologic treatment of chronic insomnia in adults, guideline at a glance
- Cochrane: Melatonin for the prevention and treatment of jet lag
- NCCIH (US National Institutes of Health): Melatonin, what you need to know
- Mah J, Pitre T (2021): Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complementary Medicine and Therapies
Get it from CarePlus Clinic
More health guides
- Melatonin in Malaysia: is it legal, where to buy it, and how to take 5 mg safely
- Mounjaro (tirzepatide) in Malaysia: how it works, doses, results, side effects and getting it safely
- Mounjaro side effects: nausea, constipation, fatigue and what to do about them
- HPV positive? What your result means, what happens next, and where Papilocare fits
