Header burger open
Search Logo

Jump To

Currently Viewing:

How Does Drinking Coffee Before Bed Affect Sleep

a profile image of TSA author Alex

Written By Alex Petrović

Certified Sleep Consultant


3 June 2024 11 min read

While tea is no doubt the most popular UK drink, coffee is a close second! However, does drinking coffee before bed ruin your chances of getting a good night's sleep?

A survey from 2021 states that 70% of people in the UK drink at least 2 cups of coffee per day on average. So, in order to save at least a few people from a restless night with no sleep, let's talk about how drinking coffee before bed affects your sleep.

When it comes to the effects of caffeine, they can range from completely inconsequential to life-changing, depending on the person and the caffeine intake. After all, caffeine is considered a drug by many measures, and while it can be useful in small amounts, it can also cause serious damage if you overdo it – or have a caffeine sensitivity.

So, let's talk about the general pros and cons of caffeine consumption and then tie it all back to sleep. And hopefully, by the end, you should know whether your daily caffeine intake needs a few tweaks.

Effects of caffeine

With the introduction out of the way, let's now focus on how caffeine consumption affects the body and the different caffeine side effects you can expect. We'll start off with the positive (as caffeine can be very beneficial when consumed in the appropriate quantities) and then move on to the negative aspects.


An image of four different cups of coffee
  • Being more alert. Most people drink coffee, caffeinated teas and sodas in order to give their brains a boost. And since caffeine stimulates the nervous system, this is exactly what you get. So, caffeine consumption in the morning can make you feel ready to take on the day.
  • Helps with certain ailments. Here we're specifically talking about headaches and hangovers. As we've just mentioned, caffeine affects your nervous system and your brain, stimulating them and making unwanted sensations like drowsiness or migraines less pronounced.


How does drinking coffee affect sleep?

An image of a person drinking cofee outside

Anyone who has ever had coffee will know that it can wake you up. But have you ever wondered how exactly it gives you that boost of energy? Well, it does so by blocking sleep-promoting receptors in your brain called adenosine receptors.

And as you can imagine, this can lead to issues when taken later in the evening. After all, our bodies control our sleepiness levels through a wide range of hormonal reactions and changes (commonly called our circadian rhythm). And throwing this clock out of the loop means that your body “won't know” that it's time to go to bed even after you've turned out the lights and gotten into bed.

This can then in turn cause sleep deprivation and/or even sleep disorders in the long run (like acute and chronic insomnia). So, a caffeine-induced sleep disturbance isn't something that should be taken lightly if it starts forming a pattern in your everyday life.

But even when looked at in a vacuum, caffeine consumption can deteriorate your sleep quality, shortening your sleep duration and your sleep efficiency. And since you didn't get enough slow-wave sleep (or REM sleep), you'll likely feel groggy in the morning and thus continue consuming caffeine in order to feel refreshed again.

Lastly, if you ever wondered why certain people claim “coffee makes me sleepy” – it's because of the same principle that makes you feel awake.

Yes, caffeine blocks the sleep receptors while it's in our system, but it can only block them for a limited time. And while they're blocked, adenosine keeps building up. So, once the caffeine has been digested and your sleep receptors clear up, you can get hit with a massive wave of adenosine and feel completely worn out.

Recommended caffeine intake

An image of a cup of coffee surrounded by coffee beans

When it comes to how much caffeine you can digest without worry, it depends on a few factors. Your age, your metabolism, your build, and even your tolerance to caffeine all play a role in determining how much caffeine you can safely consume.

But, as a general rule, research has shown that 400mg is a safe amount for adults. So, if you want to know how much caffeine your favourite coffee has, we recommend referencing the table below. And if you're more of a tea drinker – check out our article about caffeine levels in tea.

However, if you're pregnant, it's generally advised to keep your caffeine consumption under 200mg. This is because too much caffeine can cause a whole slew of problems with the birthing process, and it's not worth the risk.

How long before bed should I stop drinking coffee?

An image of a cup of coffee on a white table

A study documented in the Journal of Clinical Sleep Medicine tested the effects of caffeine when taken 0, 3, and 6 hours before bed. And the results clearly showed that even participants in the 6-hour group couldn't fall asleep as easily as the control placebo control.

And depending on your tolerance towards caffeine, these sleep-disrupting effects can even last for over a day. So, in some cases, even drinking coffee in the morning affects human sleep. And for these same people, a cup of coffee before bedtime significantly disrupts sleep in a much more noticeable way. However, it's hard to gauge whether this would apply to most people.

So, as a general rule of thumb, stop drinking coffee a minimum of six hours before you plan to go to bed. Although caffeine will likely still affect your central nervous system at that point, good sleep hygiene and the reduced concentration of caffeine (as half of the dose is usually gone five hours after consumption) should lead to proper sleep.

How long does coffee last in your body?

An image of a cup of cofee with cofee beans on the side

As briefly mentioned before, research has shown that in up to 5 hours, half of the caffeine in your body will be absorbed. And you might think that ten hours is quite a long time but unfortunately, that's not how it works.

Although logic would dictate that the other half would also be gone after 5 hours, that's not always the case. In fact, the other half can take a significantly longer time – even going into the next day in some cases.

That being said, the actual effect of coffee usually peaks rather early, at about 30-60 minutes after drinking coffee or some other caffeinated beverage. So, if you suspect that your body doesn't handle caffeine well, take into account how long it actually sticks around as you don't want to drink too much coffee by accident.

Can drinking coffee cause insomnia?

Well, yes and no. On the one hand, drinking coffee late at night can result in insomnia symptoms such as a lower sleep duration or waking up in the middle of the night.

However, when it comes to actually causing long-lasting insomnia, it's a bit trickier to say one way or another. Certainly, if you keep drinking coffee at night and then get frustrated because you can't sleep, you can start dreading your bed and sleep in general.

This can then in turn make it more difficult to fall asleep even if you've lowered your caffeine intake. On top of that, if you have a cup of coffee today and then can't sleep at night, you'll either have to wake up before you've had a proper night of rest or get out of bed early. And this can then throw your sleep schedule out of the loop.

But with all of that being said, your circadian rhythm tends to “reset” after about two weeks. So, if you've been having insomnia longer than that, it's best to see your GP and see whether there's a different cause.

Alternatives to coffee/caffeine

An image of a cup of herbal tea with milk on the side

If after reading this article you're heavily reconsidering your stance on coffee, don't worry – as there are plenty of caffeine-free alternatives on the market.

The simplest switch is to simply go for decaf. While it isn't 100% caffeine-free, it only has very small trace amounts that likely won't keep you awake at night. But if you do want to completely phase caffeine out of your diet, there are plenty of herbal teas and even herbal coffees that can do just that!

However, we also want to stress that caffeine isn't found only in coffee and strong teas – lots of energy drinks also contain a significant amount. So, if you're getting a drink from the vending machine or the store, make sure to check the label first.

So, here are a few coffee alternatives that you can try out:

Should I stop drinking coffee completely?

At this point, we wouldn't blame you for wanting to give up on coffee altogether – especially if you've had issues sleeping recently. However, while caffeine can create significant sleep disruptive effects, it's important to note that it isn't that black and white.

For one, as we've mentioned, the rate at which you digest caffeine differs from person to person. So, some people might have a very high caffeine tolerance and barely feel any of the negative drawbacks of caffeine.

Plus, when it comes to appropriate sleep hygiene practices, avoiding caffeine in the evening is just one piece of the puzzle. So, if you love your coffee and black tea to death, we recommend considering the following few factors before you completely swear off your favourite drinks.

How does drinking coffee affect you?

Unfortunately, determining how “good” your body is at dealing with caffeine isn't a straightforward practice. While there are plenty of tests to measure your caffeine sensitivity, this is mostly meant for people who might have a caffeine sensitivity or allergy.

When it comes to how coffee affects you, the best thing to do is to keep a sleep journal and see whether you can gain any insight. For example, if you drink coffee every day for 1 week and have insomnia every night and then stay off caffeine for a week and sleep like a log – the conclusion is pretty obvious.

Try to also play around with when you have your coffee. Do you still suffer severe sleep disruption when you just have a cup of coffee in the morning? Or is it only when you have it right before bed?

And if you want a more reliable reading, see if you can have a sleep study done. Sleep studies are going to be a lot more accurate than sleep diaries and your GP will be able to recommend how you should move forward.

What else is disrupting your sleep

Staying on theme from the last example, let's talk about some other factors that can make it harder to fall asleep. Coffee consumption might be the boogyman of insomnia but it's far from the only thing that can disrupt your sleep.

So, if you've done what we discussed in the previous section and concluded that coffee consumption alone isn't the cause of your sleep deprivation, here are a few more likely candidates.

Your phone or computer

We've already mentioned how caffeine disrupts your circadian rhythm by blocking out your adenosine receptors. However, there are other things that dictate your circadian rhythm and “cue” your body in when it's time to go to sleep.

One of the more important triggers in this category is light.

This is why when you're feeling groggy in the morning, going outside and having sunlight hit your face typically wakes you up. However, you don't want to have this same sensation when you're going to bed.

And this is fundamentally what happens when you stare at most screens late at night. Most phones and computers use blue light and it can keep you awake for hours, just like caffeine. So, consider turning off any electronic devices at night or at least try to tone down the usage of blue light for those devices.

Your eating habits

Caffeinated drinks aren't the only thing that can keep you awake and although food is a bit more subtle, it's still worth keeping in mind.

And this comes in two forms. Number one – when are you having your meals? If you tend to have dinner very close to your bedtime or love late-night snacks, your body could be more focused on digestion than crossing over into dreamy land.

Secondly – what are you eating before bed? If you tend to have very greasy or spicy meals late at night, digestion will take longer. Plus, this could raise your core body temperature. And, aside from light, your body temperature is a key factor in maintaining your circadian rhythm!

Your bed

While obvious to some, others seem to forget that the quality of their bedding can influence how easy or hard it is to fall asleep. After all, we've all had that experience of jumping onto a hotel bed and immediately falling asleep! So, ask yourself – is your bed up to par?

Do you have back pain?

If you tend to wake up every morning with an aching back, your mattress is likely to blame. If you're a stomach or back sleeper, it's probably too soft and allows your hips to dip into the mattress, putting pressure on your lower back.

And if you're a side sleeper, it's probably too firm and makes your spine bend in one direction.

Plus, maybe it's simply an old, low-quality mattress that doesn't offer the pressure relief your back needs to stay straight and healthy. Even a high-quality mattress topper with pressure relief can solve your issue but getting a new mattress is usually best.

Do you have neck pain?

If it's your neck that's giving you problems, it's probably your pillow's fault. If you sleep on your side, you need a firm, thick pillow to support your head.

And if you sleep on your stomach or back, you need a flatter pillow that's basically just there for comfort.

And if you have a long commute and end up sleeping on the train on a daily basis, make sure you have a good travel pillow to keep pressure off your neck as you nod off.

Do you overheat?

As we've mentioned, temperature is very important if you want to fall asleep quickly. So, if you tend to overheat during the night, you might want to look into getting a more breathable duvet.

However, do note that while the duvet does a lot of heavy lifting, it's not the only factor at play. Even getting a cooling mattress or a cooling pillow can help some people avoid overheating.


Overall, coffee can be a great thing. It can give you that energy boost that you needed and can even have surprisingly beneficial effects on your mental and physical health. However, just like with most things, moderation is key!

So, either take into account the actual amount of caffeine you consume on a daily basis or switch to one of the many caffeine-free alternatives on the market. And if you still can't fall asleep after that, we suggest browsing our website and getting your sleeping hygiene into order.

Spread the word

Resources & references

Comments (0)

There are no comments yet

About the author

Alex Petrović
Sleep Consultant
A CPD certified Sleep Consultant with more than 2000 hours of research into all the different ways we can get a great night's sleep. As a former insomniac, I know how difficult life can be without a nightly recovery and I love that I get to share everything I've learned with you all. So hopefully we can all sleep soundly!
Don't Miss Out!
Get the latest reviews, special offers, new releases and more…
'The Luxe Cooling Mattress' by @emmasleepuk  is award-winning!

Tried and Tested by The Sleep Advisors, we've awarded them the 'Best Mattress for Side Sleepers'🏆

Click the link in the bio for more 📖🥸

#thesleepadvisorsuk #awardwinningmattress #emmasleepuk  #mattressreviews
'Award Winning Softness' by @hypniauk 

Tried and Tested by The Sleep Advisors, we've awarded them the 'Best Soft Mattress'🏆

Click the link in bio to read the full review 📖🥸

#thesleepadvisorsuk #awardwinningmattress #hypnia #mattressreviews

The Sleep Advisors cover all the benefits of Panda Products 🐼🐼

Click the link in the bio for more🔗

#ɪɴsᴛᴀʀᴇᴇʟs #instareelsdaily #PandaMattress #thesleepadvisorsuk
The awards continue! @silentnightbeds 'Just Breathe Eco Comfort' receives one today 🥳

Tried and Tested by The Sleep Advisors, we've awarded them the 'Best Pocket Sprung Mattress'🏆

#thesleepadvisors #silentnightbeds #thesleepadvisors #comfortmattress
Details are key for TheSleepAdvisors... especially for those close-ups 👁

We look at every nook and cranky to capture every detail when reviewing mattress and bedding🎥

For our Latest reviews head over to our website via the link in the bio 🔗

#thesleepadvisors #mattressreview #thesleepadvisorsuk
If you want Luxury check out @nectarsleep Premier Hybrid Mattress!😎

Tried and Tested by The Sleep Advisors, we've awarded them the 'Best Luxury Mattress'🏆

Click the link in bio to read the full review 📖🥸

#thesleepadvisorsuk #awardwinningmattress #nectarsleep #mattressreviews
We know how hard it is to find the best mattress online!🧐

Don't worry, The Sleep Advisors are here to solve your problem and it has never been easier to compare mattresses thanks to our Mattress Comparison Tool!

Click the Link in our bio to find the mattress brand that suits your individual needs 🤩
For all your bedding needs, TheSleepAdvisors have you covered! 😁

From Price to Quality, we look at all aspects to enable you to make the best purchase for your needs.

#ɪɴsᴛᴀʀᴇᴇʟs #instareels #sleepadvisorsuk #BeddingEssentials #TheSleepAdvisors
Sent an embarrassing text? Just say you were asleep 😆

Turns out, our brains can get so wired even while catching Z's that we end up sending messages without even waking up! 

 #funfacts #sleepadvisors #TheSleepAdvisors  #DidYouKnow #DidYouKnowThis
Mattress Toppers are key! 🔑  They can bring your mattress to life. Want to learn more? 

The Sleep Advisors have got you covered!😎

#ɪɴsᴛᴀʀᴇᴇʟs #instareelsdaily #instareels #sleepadvisorsuk #reelsofinstagram #MATTRESSTOPPERS
Close button

Don't Miss Out!

Get the latest reviews, special offers, new releases and more…

By submitting this form, you are opting into our mailing lists.
See our privacy policy.

This field is for validation purposes and should be left unchanged.