Quick answer
Caffeine's half-life is about 4 to 6 hours for most adults, but it can range from 2 to 12 hours. In one sleep study, caffeine taken 6 hours before bed still cut sleep by more than an hour. On nights, have your last caffeine at least 6 hours before your daytime bedtime: around 3am for a 9am bed.
It's 3 o'clock in the morning on your night shift and you hit that wall. No amount of caffeine or Red Bull will help you, but you drink it anyway. Then you pay for it later, lying in bed at 10am, wired, while the rest of the street gets on with its day.
I've done that more times than I can count. Forty years of shifts, from stag in The King's Regiment to nights at Strangeways, Walton and Guys Marsh, the Jacobs Biscuits lines and Budweiser UK.
My go-to drink has always been coffee, even the Army coffee that tasted like crap. Since Costa and Starbucks made coffee quality better, my go-to has always been a Starbucks before work. During the night shift at Budweiser, some caffeine and the odd Pepsi Max was always a help to get me through the night shift wall around 3am.
How long does caffeine last in your body?
Caffeine kicks in fast and leaves slowly. The Sleep Foundation's guide to how long caffeine takes to wear off says you start to feel it within 15 to 60 minutes. Half of it is usually cleared in 4 to 6 hours, but for any one person that half-life can be anywhere from 2 to 12 hours.
"Half-life" is the key idea. It is the time your body takes to clear half the caffeine you drank. The other half is still working on you. So if you have a strong coffee at 4am and your half-life is 5 hours, about half of it is still in your system at 9am, just as you are drawing the blinds.
The same page lists things that change how fast you clear it, including pregnancy, the contraceptive pill, alcohol and smoking. That wide 2-to-12-hour range is why two people on the same shift can drink the same brew and sleep completely differently afterwards.
What happens if you have caffeine 6 hours before bed?
You lose sleep, and you probably won't notice. In a 2013 study reported by the American Academy of Sleep Medicine, 12 healthy sleepers took 400 mg of caffeine either 6 hours, 3 hours or right before bed. Even at 6 hours, their measured sleep time dropped by more than an hour.
The part that stuck with me is this: the people in the study were unaware of it. They thought they had slept fine. That's the night worker's trap. You think the 4am energy drink has worn off because you feel tired at 9am, but it is still chipping away at the sleep you need for the next shift.
Two things are worth knowing about that study. The dose was big: 400 mg is roughly a full day's worth for most adults. And it was night-time sleep in normal sleepers, not daytime sleep after a shift. Daytime sleep is already lighter and easier to break, so if anything I would treat 6 hours as the minimum, not a safe zone.
What time should I stop caffeine on a night shift?
Work backwards from the time you will actually be in bed, not the time you clock off. Take your bedtime, subtract 6 hours, and that is your last brew. If you are sensitive to caffeine, or you know you sleep badly after a late coffee, go further: the Sleep Foundation notes that experts typically recommend stopping at least 8 hours before bed.
| Bed after your shift | Last caffeine (6-hour rule) | Last caffeine (8-hour rule, if you're sensitive) |
|---|---|---|
| 7am | 1am | 11pm |
| 8am | 2am | Midnight |
| 9am | 3am | 1am |
| 10am | 4am | 2am |
Here's how that plays out for a typical 10pm to 6am night with a 40-minute drive home:
- Have your main caffeine at the start of the shift, between 10pm and midnight, when it does the most good.
- Allow one smaller top-up before your cut-off if you need it (2am for an 8am bed).
- After the cut-off, switch to water, squash or decaf. Keep the lights bright and get up and move when the 3am to 5am dip hits instead of reaching for another can.
- If you are struggling to stay awake for the drive home, don't solve it with caffeine at 5am. Stop somewhere safe and nap, or get a lift. A short planned nap during the shift is covered in how to stay awake on a night shift.
The free Night Shift Recovery Calculator does this sum for you. Put in your finish time and commute and it gives you a caffeine cut-off, a light plan and a wind-down time.
Clocks going back this month: UK clocks go back one hour at 2am on Sunday 25 October 2026. If you are on nights that weekend, your shift runs an hour longer by the clock. Keep your cut-off tied to your planned bedtime, not the hour you've been at work, or that extra hour will tempt you into a 4am coffee you'll regret at 10am.
How much caffeine is too much?
The European Food Safety Authority's scientific opinion on caffeine (summary slides) gives three numbers worth knowing for healthy adults (pregnancy has separate advice):
- Up to 400 mg a day from all sources does not raise safety concerns.
- Single doses up to 200 mg do not raise safety concerns.
- Just 100 mg close to bedtime may make it take longer to fall asleep and shorten sleep in some adults.
That last point is the one for night workers. 100 mg is not a lot. According to the UK government's consultation on high-caffeine energy drinks, a 250 ml energy drink typically has about 80 mg of caffeine, and a 500 ml can averages 160 mg, with some reaching 200 mg. Any drink with more than 150 mg per litre has to carry a high-caffeine warning on the label, so check the can.
| Drink | Typical caffeine | Source |
|---|---|---|
| Energy drink, 250 ml | About 80 mg | GOV.UK |
| Energy drink, 500 ml | About 160 mg (up to 200 mg) | GOV.UK |
| EFSA single-dose limit | 200 mg | EFSA |
| EFSA daily limit | 400 mg | EFSA |
One big can at 4am is close to the single-dose limit on its own, and well over the 100 mg that can affect sleep, right before you try to go to bed.
Do energy drinks help with the 3am wall?
A bit, briefly, and at a price. The 3am wall is your body clock telling you it should be asleep. Caffeine can blunt that feeling, but it doesn't remove the need for sleep, and a can drunk at 3am is still half in your system at 8am or 9am.
It's a pattern I know well: the can at 3am, the second wind, then lying awake at 10am with a racing head, sleeping badly, and starting the next night already behind. What works better for me personally is front-loading caffeine at the start of the shift, then using light, movement, cold water and some overnight oats with fresh strawberries and blackberries around 3am. If you do want something at the wall, the overnight oats or a light meal with protein before your cut-off beats a big breakfast after the shift.
Food plays a big part too: a heavy meal at 3am makes the slump worse; light snacks help. There's more on that in what to eat on a night shift.
The bottom line
Caffeine lasts much longer than the buzz. With a half-life of 4 to 6 hours, and up to 12 for some people, the can you drink at 3am is still in the room with you at 9am. Set your cut-off 6 hours before bed (8 if you're sensitive), front-load caffeine at the start of the shift, and use light, movement and a planned nap for the 3am wall.
Then give your body the best chance once you're home: dark room, cool room, steady sound. A deep, steady sound such as brown noise or rain helps cover the school run, the bin lorry and the neighbour's drill. For the full routine, see how to sleep during the day after a night shift and the night shift survival guide.
Try Sleyp free in your browser: 13 sounds, a custom timer and a wake-up chime, all free. Keep the page open while you sleep so the timer and chime can run. The Sleyp iOS app is coming soon.
Sources
- American Academy of Sleep Medicine: Late afternoon and early evening caffeine can disrupt sleep at night (Drake et al., 2013)
- Sleep Foundation: How long does it take for caffeine to wear off?
- EFSA: Scientific opinion on the safety of caffeine (summary slides, 2015)
- GOV.UK: Banning the sale of high-caffeine energy drinks to children (consultation)
Frequently asked questions
How long does caffeine stay in your system?
Half of it is usually cleared in 4 to 6 hours, but the half-life can range from 2 to 12 hours depending on the person. That means a good share of a 3am coffee can still be in your system when you go to bed at 9am.
What time should I stop caffeine on a night shift?
At least 6 hours before your planned bedtime, and 8 hours if you're sensitive to it. For a 9am bed, that means your last caffeine by 3am, or 1am to be safer.
How much caffeine is in an energy drink?
According to GOV.UK, a 250 ml energy drink typically has about 80 mg and a 500 ml can averages 160 mg, with some up to 200 mg. Drinks over 150 mg per litre must carry a high-caffeine warning.
Can I sleep straight after caffeine if I'm exhausted?
You may fall asleep, but the sleep is likely to be shorter and lighter. In the 2013 study, people lost more than an hour of sleep from caffeine taken 6 hours earlier and didn't realise it.
Is decaf OK after my cut-off?
Decaf has far less caffeine than regular coffee, so it's a reasonable swap for the warm-drink habit in the second half of a shift. Water and squash are the safest choices before a daytime sleep.
Do the clocks going back affect my caffeine cut-off?
Only if you let them. When the clocks go back on Sunday 25 October 2026, a night shift that weekend runs an hour longer by the clock. Keep your cut-off fixed to your planned bedtime, not to how long you've been on shift.
Want the sounds without the setup? Try Sleyp free in your browser, and take it with you in the Sleyp app when it reaches the App Store.
Sleyp guides cover lifestyle, performance and operational safety for people working non-traditional hours. They are not medical advice. If sleep problems are affecting your health, speak to your GP.