Caffeine and Sleep: When to Stop Drinking Coffee
Share
Coffee gets you through the afternoon, then keeps you awake at night, so you need more coffee the next day. Caffeine stays in your body far longer than the buzz lasts. This guide covers how caffeine affects sleep, when to stop drinking coffee, and how much caffeine is in what you drink.
The short answer: stop caffeine at least 3 to 7 hours before bed, and earlier if you're sensitive. For most people with a 10 or 11pm bedtime, that means no coffee after about 2 or 3pm. If you still sleep badly, make it a mornings-only habit. Healthy adults can have around 400mg of caffeine a day, which is roughly the amount in two to three 50mL espressos.
How caffeine keeps you awake
Through the day, a chemical called adenosine builds up in your brain and makes you feel sleepy. Caffeine works by blocking the receptors that adenosine binds to, so the tiredness is still there, but you don't feel it.
The Sleep Health Foundation says caffeine reaches peak levels within 30 to 70 minutes. Its effects can then last 3 to 7 hours, but it may take up to 24 hours to fully leave your body (source). That's why a 4pm coffee can still be working at 10pm, even if you feel tired.
When should you stop drinking coffee?
The advice varies, because people vary:
| Source | Advice |
|---|---|
| healthdirect | Avoid tea, coffee and caffeinated soft drinks for at least 3 to 7 hours before bed |
| Sleep Health Foundation | At least 3 to 7 hours; if you're sensitive, avoid caffeine after lunch |
| 2013 sleep study | A large dose taken even 6 hours before bed cut sleep by more than an hour |
| 2023 Australian review of 24 studies | A standard cup of coffee is best had at least 8.8 hours before bed |
A practical rule: set your cut-off at 2pm. If you're still lying awake, move it to midday.
In the 2013 study, people didn't always notice the sleep they'd lost. Caffeine can make your sleep shorter and lighter without you feeling like it kept you up.
How much caffeine is in your drink?
These figures are from Food Standards Australia New Zealand (source).
| Drink | Caffeine |
|---|---|
| Espresso (50mL) | 145mg |
| Instant coffee (1 teaspoon in a 250mL cup) | 80mg |
| Energy drink (250mL can) | 80mg |
| Black tea (220mL) | 50mg |
| Cola (375mL can) | 36mg |
| Milk chocolate (50g) | 10mg |
A flat white or latte is espresso with milk, so it has about the same caffeine as the shots that go into it. Decaf isn't always caffeine-free. It can still contain a small amount.
How much caffeine is too much?
healthdirect's guidance (source):
- Healthy adults: around 400mg a day is safe.
- Pregnant or breastfeeding: limit caffeine to 200mg a day.
- Under 18: less than 2.5mg a day for each kilogram of body weight.
Why coffee affects some people more
- Genetics. Some people clear caffeine quickly, and others slowly.
- Age. Older people may be more sensitive to its effects.
- Pregnancy and the pill. Caffeine is cleared more slowly in pregnancy and in people taking oral contraceptives.
- Smoking. Smokers clear it faster.
If one coffee after lunch keeps you up, you're not imagining it.
How to cut back without the headache
- Move your last coffee earlier by an hour every few days.
- Swap the afternoon cup for decaf, herbal tea or water.
- Watch the hidden sources: cola, energy drinks, pre-workout, chocolate and tea.
- Get daylight and a short walk at the afternoon slump instead.
- Fix the cause. If you need caffeine to function, you may not be getting enough sleep. See how much sleep do I need?
Shift workers and early starts
Caffeine is useful early in a night shift or for a 4am start, but the same rule applies: stop it well before the sleep that follows. See silent alarms for shift workers and how to wake up at 4am for work.
Where the Sovune Nudge fits
We make the Sovune Nudge, a vibrating alarm wristband, so we're not neutral. It doesn't replace coffee, but it helps with the other half of the cycle:
- Waking on time without the fog of a bad night. It starts as a gentle tap and builds through three intensity levels over a full minute.
- A set wake-up time every day, which makes it easier to fall asleep at night without leaning on caffeine the next day.
- Silent, so an early start doesn't wake anyone else.
It comes with a 30-day money-back guarantee.
Quick answers
How long before bed should I stop drinking coffee? At least 3 to 7 hours. If you're sensitive to caffeine, stop after lunch.
Does a 3pm coffee affect sleep? It can. Caffeine's effects last 3 to 7 hours, and it can take up to 24 hours to clear fully.
How much caffeine is safe per day? Around 400mg for healthy adults, and 200mg if you're pregnant or breastfeeding.
Does decaf have caffeine? Usually a small amount, far less than regular coffee.
For more habits that help, see our sleep hygiene checklist. For every type of silent alarm compared, see our complete guide to vibrating alarms in Australia.