Caffeine: Why it impacts sleep and how to manage it

Written by: Harry Booth



Time to read 3 min

We're all familiar with the alerting effects of caffeine: that's part of the reason we drink it in the first place. But understanding how caffeine interacts with our body helps explain its impact on sleep. 

Why caffeine impacts sleep

While we're awake, a hormone called adenosine accumulates in the body. As adenosine builds up, it causes us to feel sleepier. This is known as sleep pressure.

Caffeine has a similar molecular structure as adenosine, which allows it to bind to the same receptors. This temporarily blocks the sleep-inducing effects of adenosine, making us feel alert.

What the science says about caffeine's effect on sleep quality

One study1 found that consuming caffeine 6 hours before bed resulted in participants sleeping one hour less.

You're probably thinking, 'but I drink coffee in the afternoon and still sleep like a baby.'

I used to be that person. While I was studying, I worked evening shifts in a bar. The first thing I'd do when I started work at 6 pm? Slam back a double-shot latte.

But research shows that even if you do fall asleep, the caffeine in your system will degrade your sleep quality. A single cup of coffee in the evening reduces deep sleep by 20%.

As a result, you may wake up the next day feeling less restored and, ironically, more desperate for caffeine. You may find yourself in a vicious cycle of using caffeine to compensate for poor sleep.

There is also some evidence that caffeine may slightly shift this rhythm2, but more research is needed.

"A single cup of coffee in the evening reduces deep sleep by 20%."

The best time to have coffee (and when to stop)

If you've read this far, you may be starting to worry about caffeine's impact on sleep. But you can mitigate the negative effects of caffeine by being mindful of when you consume it.

Researchers study a substance's half-life: how long it takes the body to halve the concentration in the bloodstream. Caffeine has a half-life of 5-7 hours. That means if you have a flat white at 3 pm, your body will have only metabolised half the caffeine content by 8 pm. The other half is still in your system.

Avoiding caffeine 8 hours before bed is a good rule of thumb. However, exactly how many hours you should give depends on many factors.

The rate of caffeine metabolism varies widely from person to person, with 50% of the population possessing a gene that dramatically slows the metabolism of caffeine. Pregnant women or those taking birth control also have a longer caffeine half-life3,4.

Additionally, it's important to consider how much caffeine you're taking. Caffeine's quarter-life is much longer than its half-life. That means high doses of caffeine, even in the morning, may still affect your sleep.

Food Standards Australia New Zealand recommends that you don't exceed 400mg of caffeine5. If you're pregnant, it's recommended you consume only half that amount at 200mg.

Watch out for other sources of caffeine

Coffee is by far the primary source of caffeine. However, many teas, soft drinks and energy drinks contain high amounts of caffeine. Loose-leaf tea contains more caffeine per gram than coffee. But we tend to use more ground coffee per cup. 


  • Avoiding caffeine 8 hours before bed is a good rule of thumb. But we're all different. Be mindful of how caffeine affects you.
  • Everything in moderation. A morning cuppa is fine. But don't overdo it.
  • Watch out for other sneaky sources of caffeine in the evening. Teas, dark chocolate, and even decaffeinated coffee contain enough caffeine to impact your sleep.

I hope you found this helpful. For more recommendations for improving sleep quality, check out our other blog posts.


  1. Drake, C., Roehrs, T., Shambroom, J. & Roth, T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J. Clin. Sleep Med. JCSM Off. Publ. Am. Acad. Sleep Med. 9, 1195–1200 (2013).

  2. Burke, T. M. et al. Effects of caffeine on the human circadian clock in vivo and in vitro. Sci. Transl. Med. 7, 305ra146-305ra146 (2015).

  3. Ribeiro-Alves, M. A., Trugo, L. C. & Donangelo, C. M. Use of Oral Contraceptives Blunts the Calciuric Effect of Caffeine in Young Adult Women. J. Nutr. 133, 393–398 (2003).

  4. Zealand (, S. designed and developed by bka interactive ltd, Auckland, New. Caffeine. Health Navigator New Zealand

  5. Caffeine.