Caffeine and sleep: When to have your last coffee

Key points

  • Whether your last coffee affects sleep depends on the dose, your bedtime and your sensitivity.
  • If you suspect a connection, move your last caffeinated serving earlier while keeping bedtime similar.

Whether your last coffee affects sleep depends on the dose, your bedtime and your sensitivity. Work back from your usual bedtime and count tea, cola, energy drinks and caffeinated training products too. Trials test particular doses and intervals, so they give no universal cut-off time. [1, 2]

What two sleep experiments found

Gardiner and colleagues tested 100 and 400 mg of caffeine in 23 men four, eight or twelve hours before bedtime. Under those conditions, 100 mg had no statistically significant effect on the measured sleep outcomes. With 400 mg, some measures changed even at twelve hours. In Drake and colleagues’ trial, 400 mg shortened sleep even when taken six hours before bed. Both trials tested single doses. [1, 2]

Track the timing of your own coffee

If you suspect a connection, move your last caffeinated serving earlier while keeping bedtime similar. For several days, note what you drank, when you drank it and how you fell asleep. Note overnight waking and how rested you feel in the morning too. Any changes are clues and can have other causes. [1, 2]

Frequently asked questions

Is a six-hour gap always enough?

Six hours can be too short for a large single dose. A dose from a study cannot be translated into a fixed number of cups because serving size and preparation vary. [1, 2]

Sources

  1. Gardiner et al. (2025) · Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial
  2. Drake et al. (2013) · Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed

Related articles