Melatonin for Sleep: Does It Work, How Much Is Safe and Who Should Avoid It

Few supplements have grown as fast as melatonin. Walk into any pharmacy in the United States and you will find rows of gummies, tablets and sprays promising a deeper night. In the UK and many European countries, the picture is different, because melatonin is a prescription medicine there. Yet the same question comes up everywhere: does it actually work, and is it safe to take every night?

Melatonin helps tell your body when it is night, which makes it useful for a few specific sleep problems, but it is not a general-purpose sleeping pill. This guide uses the US National Center for Complementary and Integrative Health (NCCIH) and other medical sources to explain what melatonin is, what the evidence supports, what can go wrong and what to try first. If you have been searching for melatonin for sleep, the honest answer is more nuanced than most product labels suggest.

The short version: Melatonin is a hormone that signals night to your body clock. Evidence is best for jet lag and delayed sleep timing, and weaker for long-term insomnia. Short-term use looks safe for most adults, but long-term safety is unknown, product labels are often wrong, and children, older adults and people on medicines need medical advice first. Good sleep habits and CBT for insomnia come first.

What melatonin is and what it does

Melatonin is a hormone made by the pineal gland in your brain. Production rises in the evening when light fades and falls in the morning. It does not knock you out. Instead it helps set your internal 24-hour clock, signalling that it is night so that sleep can follow. That is why it is sometimes called a timing signal rather than a sedative.

Most melatonin supplements are made synthetically. In the United States it is sold as a dietary supplement, which means it is regulated less strictly than a medicine. In the UK and several other countries it is available on prescription only. This matters for quality, as you will see below.

When the evidence is strongest

NCCIH summarises the research by condition, and the picture varies a lot.

  • Jet lag: reviews suggest melatonin can reduce symptoms, especially after eastward travel across several time zones.
  • Delayed sleep-wake phase disorder: this is when your natural body clock runs late. In one trial of 307 people, melatonin taken about an hour before the desired bedtime helped people fall asleep around 34 minutes earlier.
  • Sleep problems in children: a 2019 review of 18 studies and over a thousand children found melatonin better than placebo for falling asleep, but the studies were small and short, mostly one to 13 weeks.
  • Anxiety before surgery: a review of 12 studies found strong evidence that it reduces this anxiety.
  • Chronic insomnia: there is not enough strong evidence to recommend it. The American College of Physicians recommends cognitive behavioural therapy for insomnia (CBT-I) as the first treatment.
  • Shift work: studies are small and inconclusive.

The takeaway is that melatonin works best when the problem is timing, not when the problem is a mind that will not switch off or a bedroom that is too bright, loud or hot.

Melatonin for sleep: how much to take, and when

NCCIH does not give a standard dose, and that is deliberate. Products and studies use a wide range, and more is not necessarily better. Your body already makes tiny amounts, so even low doses can have an effect. A doctor or pharmacist can suggest a starting amount for you.

Timing matters more than most people realise. For a delayed body clock, it is usually taken an hour or so before the target bedtime, not at the moment you get into bed. For jet lag it is taken at the destination bedtime. Taking it at random times can even shift your clock in the wrong direction.

Safety, side effects and interactions

For most healthy adults, short-term use appears to be safe. The most common side effects are mild: headache, dizziness, nausea and daytime sleepiness. Some people report vivid dreams.

What nobody can say with confidence is what happens after years of nightly use, or at doses much higher than the body normally produces, because long-term research is lacking. Allergic reactions are possible.

  • Medicines: talk to a clinician if you take blood thinners, diabetes medicines, blood pressure medicines, immune-suppressing drugs or sedatives.
  • Epilepsy: NCCIH advises people with epilepsy to take melatonin only under medical supervision.
  • Pregnancy and breastfeeding: research is lacking, so ask your doctor.
  • Older adults: the effects can last longer and cause daytime drowsiness. The American Academy of Sleep Medicine advises against use in people with dementia.
  • Driving: do not drive or operate machinery if you feel drowsy.
Melatonin for sleep: a woman reading the label on a small supplement bottle in a pharmacy aisle
A woman reading the label on a small supplement bottle in a pharmacy aisle. Image created with AI.

The product quality problem

Because supplements are not tightly regulated in the US, what is on the label may not match what is in the bottle. A 2017 study of 31 products found that most did not match their labels, and about one in four contained serotonin. A 2023 analysis of 25 gummy products found that 22 were mislabelled, with melatonin amounts ranging from 74% to 347% of the amount stated.

If you decide to use melatonin, choose a product tested by an independent group such as USP or NSF, avoid gummies that look and taste like sweets, and keep them out of children’s sight and reach.

Children and melatonin

Melatonin is now one of the most common supplements given to children, and that worries many doctors. NCCIH reports that US poison centres received more than 52,000 reports involving people aged 19 and under in 2021, up from about 8,300 in 2012. A US CDC report estimated about 11,000 emergency visits between 2019 and 2022 for accidental ingestion by children aged five and under.

Short-term side effects in children are usually mild, such as sleepiness, bedwetting, headache and agitation. The long-term effects on growth and puberty are not known. If your child struggles to sleep, talk to a paediatrician first, because sleep problems often have causes that melatonin will not fix, such as screens, irregular schedules, anxiety, restless legs or sleep apnoea.

What the classical Indian texts say about sleep

Traditional Indian medicine treats sleep (nidra) as one of the foundations of health. The Charaka Samhita names three supports of life, trayopastambha: food (ahara), sleep (nidra) and regulated living (brahmacharya). It says that proper sleep brings happiness, nourishment, strength and clarity, while disturbed or excessive sleep leads to unhappiness, weakness and dullness. The same text discusses sleep and body weight in the chapter known as Ashtauninditiya (Sutrasthana 21).

The Bhagavad Gita (6.17) says that yoga removes suffering for one who is moderate in food and recreation, moderate in action, and moderate in sleep and waking. The word yukta there means regulated or appropriate, not too little and not too much. The Ashtanga Hridaya recommends sleeping at night, avoiding daytime sleep for most people, and going to bed at a regular time.

These are traditional teachings, not clinical trials, but they line up with what sleep medicine now recommends: a regular schedule, enough but not excessive sleep, and a calm evening. Our guide to an Ayurvedic bedtime routine and our article on yoga nidra put these ideas into practice.

A man reading a paper book in bed in warm lamp light with his phone face-down
A man reading a paper book in bed in warm lamp light with his phone face-down. Image created with AI.

What to try before reaching for melatonin

If your sleep is poor, a few steps often work better than any pill.

  • Keep a regular wake-up time, even at weekends.
  • Get bright light in the morning and dim lights in the last hour before bed.
  • Keep the bedroom cool, dark and quiet, and keep the phone out of reach.
  • Limit caffeine after midday and alcohol close to bedtime, which fragments sleep.
  • Use the bed for sleep, and get up for a short time if you have been awake for a long while.
  • Try CBT-I, available through some health services, books and online programmes.

If you snore loudly, wake with a headache or feel sleepy during the day, ask your doctor about sleep apnoea. If low mood or worry keeps you up, say so. Treating those problems often fixes sleep too.

Common mistakes with melatonin

  • Taking it at bedtime when the problem is a late body clock that needs an earlier dose.
  • Using high doses in the hope of a stronger effect.
  • Buying unlabelled or unverified products online.
  • Giving it to a child without asking a doctor.
  • Mixing it with alcohol or other sedatives.
  • Using it for months without ever asking why sleep is poor.

Melatonin questions answered

Is melatonin addictive?

It is not known to cause physical dependence like some prescription sleeping tablets, but people can come to rely on it psychologically. If you want to stop, discuss it with a clinician.

Can I take it every night?

Short-term use appears safe, but there is little information about taking it for years. It is reasonable to use it for a defined purpose, such as a trip, and review after a few weeks.

Can melatonin help with anxiety?

There is good evidence for anxiety before surgery, but not for everyday anxiety. If worry affects your sleep, see your doctor about options.

Is it safe with other supplements?

It depends on what you take. Bring all your supplements and medicines to your pharmacist.

Why does melatonin not work for me?

It may be the wrong problem, the wrong time or a low-quality product. Insomnia caused by stress or caffeine rarely responds to it.

How your body clock works

To make sense of when melatonin helps and when it does not, it helps to understand the clock it works with. Deep in the brain, a small cluster of cells called the suprachiasmatic nucleus acts as the master timer. It takes its cues mostly from light that enters the eyes, and it tells the pineal gland when to release melatonin. In daylight the signal is switched off. As evening falls, melatonin rises, body temperature drops slightly and sleepiness builds.

People differ in how their clocks run. Some are naturally early, waking easily at dawn and fading by nine in the evening. Others are naturally late and feel most alert at night. Teenagers tend to drift later during puberty, which is one reason early school start times are so difficult for them. Understanding your own pattern can save you money on supplements, because many people who think they have insomnia actually have a body clock that is out of step with their schedule.

Light is the strongest influence. Bright light in the morning pulls the clock earlier, while bright light late in the evening pushes it later. This is why a phone screen at midnight can delay sleep even though the amount of light seems small. It is also why a walk outside soon after waking is one of the most effective, and cheapest, ways to improve sleep timing.

A traveller by an airplane window at sunrise wrapped in a light blanket
A traveller by an airplane window at sunrise wrapped in a light blanket. Image created with AI.

A practical plan for jet lag

Jet lag is the clearest case where melatonin makes sense. The problem is simple: your internal clock is set to one place and the sun is somewhere else. A few steps can shorten the adjustment.

  • A few days before an eastward trip, go to bed and get up a little earlier each day, and get morning light.
  • On arrival, follow local meal and bedtimes as soon as possible rather than sleeping when you feel like it.
  • If you use melatonin, discuss the dose and timing with a pharmacist or doctor, since timing relative to your destination bedtime matters.
  • Get outside in daylight at the destination, and avoid bright screens late at night.
  • Keep caffeine for the early part of the day and avoid alcohol on the flight, which makes sleep lighter.
  • Allow roughly a day of adjustment for each time zone crossed, and be kind to yourself during that time.

Eastward travel is usually harder than westward, because it asks your body to fall asleep earlier than it wants to. Short trips of one or two days are often better handled by staying on your home schedule than by trying to adjust at all.

Foods and habits that support natural melatonin

Some foods contain small amounts of melatonin, including tart cherries, certain nuts and some grains, but the amounts are small and highly variable, and research on whether eating them changes your sleep is limited. A warm, light evening meal, a regular dinner time and avoiding heavy food in the last two to three hours before bed are more reliable habits than any single food.

Evening routines help your body recognise that night has come. Dim the lights, slow down, take a warm shower, read something calm, and keep screens out of the bedroom if you can. Gentle stretching or slow breathing can lower arousal. If your mind is busy, writing tomorrow’s to-do list on paper before bed gives your brain permission to let go. These small habits are not glamorous, but studies on sleep hygiene and CBT for insomnia consistently support them.

How to talk to your doctor about sleep

If sleep problems have lasted more than a few weeks, it is worth seeing a doctor instead of managing it alone. To make the visit useful, keep a simple sleep diary for one to two weeks. Note when you go to bed, roughly when you fall asleep, how often you wake, when you get up, and how you feel in the day. Add caffeine, alcohol, medicines and supplements, including melatonin.

Questions worth asking include whether a medical condition or medicine could be affecting your sleep, whether you should be screened for sleep apnoea or restless legs, whether CBT for insomnia is available, and whether melatonin is appropriate for you and at what time. Bring the actual product, because brands differ so much. If you are pregnant, breastfeeding, taking other medicines or managing a long-term condition, say so at the start.

A note on sources and limits

This guide relies mainly on the NCCIH summary of melatonin research, UK NHS sleep guidance and major sleep-medicine bodies. Sleep science evolves, product rules differ between countries, and your situation is unique, so please treat this as general education and not as medical advice. If you ever feel unusually sleepy during the day, fall asleep while driving, or have thoughts of harming yourself, seek help promptly.

Further reading

This article is for general education and is not medical advice. If symptoms persist or worry you, please speak with a qualified healthcare professional.

About the author

Rohit writes and edits the educational guides on MyHealthLogy, a journal about everyday energy, stress and routine inspired by Ayurveda. Read more on the author page, our editorial policy and the medical disclaimer. This article is for general information and is not a substitute for professional medical advice.