What does melatonin do? The sleep hormone explained
Melatonin tells your body when it's night-time. Here's how light, age and menopause affect it, whether melatonin tablets help, and what you can do to sleep better.
Last reviewed ยท Based on NHS and NICE guidance
Quick answer
Melatonin is a hormone made by the pineal gland in the brain. It rises in the evening and peaks at night, helping set your sleep times. Light at night lowers it, and levels fall with age. In the UK, melatonin tablets are prescription only.
Key points
- Melatonin is made in the brain and is highest at night.
- Light, including from screens, lowers melatonin.
- Levels fall with age, and menopause can disturb sleep too.
- In the UK, melatonin is only available on prescription.
What is melatonin?
Hormones are chemical messengers. They're like text messages your body sends to tell different parts what to do. Melatonin's message is "it's night-time".
Melatonin is mainly made by the pineal gland, a tiny gland in the brain.1 A body clock in the brain, set each day by light entering your eyes, controls how much is made.1
Where is melatonin made, and what controls it?
Melatonin is made deep in the brain, but your eyes tell it when to switch on. Tap a number on the picture to jump to that part.
1Pineal gland
This tiny gland in the brain makes most of your melatonin. Output rises at night and falls during the day.1
Good to know: levels are also higher in autumn and winter than in spring and summer.1
2Eyes and body clock
Light entering your eyes sets the brain's body clock each day. In daylight, the clock keeps melatonin low.1
Light at night: even dim light can lower melatonin. This is how phones and laptops before bed can upset sleep.1
How does melatonin change through the day and through life?
Melatonin follows a daily rhythm. It stays low in daylight, rises in the evening and peaks at night.1
Early life
Babies start making melatonin at around three or four months old. Levels peak between ages one and three.1
Steady, then falling
Levels stay fairly steady into early adulthood, then fall slowly in most people.1
How does poor sleep affect mood and wellbeing?
Insomnia means regularly having trouble sleeping. It can leave you tired and irritable during the day.3
Getting to sleep
Finding it hard to fall asleep is a common sign of insomnia.3
Waking up
Waking often in the night, or too early in the morning, is another.3
The next day
Feeling tired or irritable during the day often follows a poor night.3
If you're having thoughts of harming yourself or ending your life, please get help now. Call Samaritans free on 116 123 at any time.6 You can also call NHS 111, or call 999 or go to A&E if you're in danger.
What can upset melatonin and sleep?
Many things affect sleep, not just melatonin. Use this table as a starting point, and talk to your GP if sleep problems carry on.
| Cause | What happens | What can help |
|---|---|---|
| Screens at night | Light from phones and laptops can lower melatonin1 | Avoid screens right before bed3 |
| Caffeine, alcohol and nicotine | They can keep you awake3 | Avoid them for at least six hours before bed3 |
| Jet lag and shift work | Your body clock gets out of step1 | Ask your GP or pharmacist for advice2 |
| Menopause | Hot flushes and anxiety can disturb sleep5 | A room that's not too hot, and CBT5,4 |
| Getting older | Your body makes less melatonin1 | Regular sleep and wake times3 |
Can melatonin help with jet lag and shift work?
Given at the right time of day, melatonin can reset the body clock. It's used for jet lag and shift work.1
What can help you sleep better?
We've listed options in order: everyday changes first, then medical treatment, then supplements.
Lifestyle
Medical treatment
CBT for insomnia
Your GP may refer you for CBT, which helps change the thoughts and habits that upset sleep.3
Prescribed melatonin
Mainly for adults aged 55 and over, usually for up to 13 weeks.2
Sleeping pills
GPs rarely prescribe them, and only for a short time, because of side effects and the risk of dependence.3
Never start, stop or change sleeping tablets or any prescribed medicine without talking to your GP first.
Supplements
We can't promise any supplement will work for you. Here's what you need to know about the most common sleep products.
Under 18? The only supplement the NHS advises for most young people is vitamin D. For anything else, talk to a parent, carer or GP first.
Melatonin
Melatonin can help some people sleep, especially when low levels have been diagnosed.1 In the UK, it's only available on prescription.2
Possible side effects include a headache, or feeling tired, sick or irritable the next day. Alcohol and smoking can stop it working as well.2
Always check with a pharmacist or GP before starting a new supplement. This is especially important if you're pregnant, breastfeeding, have a long-term condition or take prescribed medicines.
When should I see a GP?
See a GP if self-help hasn't worked, you've had trouble sleeping for months, or it's hard to cope with daily life.3
If you're struggling
- Thoughts of harming yourself or ending your life: call Samaritans on 116 123, or 999 if you're in danger6
If you take melatonin
Frequently asked questions
Can I buy melatonin in the UK?
No. In the UK, melatonin is only available on prescription. It's mainly prescribed for short-term sleep problems in adults aged 55 and over.2
Do screens before bed affect melatonin?
Why do I sleep worse as I get older?
There are many reasons, but melatonin is one. By age 70, night-time melatonin is a quarter or less of a young adult's.1
Can menopause affect my sleep?
Read next
Sources
- You and Your Hormones (Society for Endocrinology): Melatonin
- NHS medicines: About melatonin
- NHS 111 Wales: Insomnia
- NICE: Updated guideline recommends more treatment choices for menopause symptoms
- Cancer Research UK: Sleep problems and sex hormone symptoms in women
- Samaritans: free, 24-hour support on 116 123
Written by: Horrormones. Medical reviewer: none. Last reviewed: 3 November 2026.
This page is general information, not medical advice, and we can't promise any advice or supplement will work for you. Please speak to your GP or pharmacist about your own symptoms.
Hormone changes can be tough, but you don't have to work them out alone. If something's bothering you, your GP is a good next step.