Short answer: Yes. Caffeine is a stimulant that can stay in your body for hours, so an afternoon coffee can make it harder to fall asleep or stay asleep. People differ a lot, so try moving your last caffeine to before early afternoon for a week and see what changes.
Free guide: a gentle first week of better sleep, one ten-minute job a day plus a two-minute sleep diary. Get Your First Week of Better Sleep.
Many people who say they can drink coffee at night and sleep fine are sleeping worse than they realise. Others are very sensitive, and one morning coffee seems to follow them into the night. The truth is that caffeine affects people differently, which makes general rules awkward and personal testing useful.
This guide explains how caffeine works on sleep, where it hides, how to find your own cut-off time, and how to cut back without a headache. It is education, not medical advice.
Caffeine is a stimulant. It works partly by blocking the signals that build up through the day and make you feel sleepy. Take it late and it can make it harder to fall asleep, shorten sleep and lighten it, even if you do not feel wired. The Sleep Health Foundation lists caffeine among the common influences on sleep, and healthdirect includes it in the list of things that can contribute to insomnia.
It varies a lot between people. For many adults, caffeine takes several hours to fall to half its level, and some of it can still be around at bedtime if you drink it in the afternoon. Genes, medicines, pregnancy, liver health and smoking can all change how fast your body clears it. This is why you cannot copy your friend's cut-off time.
Coffee is the obvious one. Others are easier to miss:
Check the label on energy drinks and supplements, because the amount can be much higher than in a normal coffee.
There is no universal time. Many sleep resources suggest avoiding caffeine from the middle of the afternoon if you have sleep trouble, and sensitive people may need to stop earlier. A reasonable test is to stop caffeine by about midday or early afternoon for a week and see whether you fall asleep more easily, wake less in the night and feel better in the morning.
Change only one thing at a time. If you change your caffeine, alcohol, bedtime and screens in the same week, you will not know which helped.
Stopping suddenly can cause headaches, tiredness and irritability for some people. A gentler way is to reduce slowly: swap the last drink of the day for decaf or herbal tea, then move the cut-off a bit earlier each few days, or halve the size of a drink. Drink water, get daylight and move in the afternoon to keep energy up. If you drink a lot of energy drinks or take caffeine regularly for fatigue, mention it to your GP, because tiredness may have another cause.
Many people use afternoon coffee to push through a slump, which can make night sleep worse and the next slump worse still. Try a short walk outside, a glass of water, a small snack with some protein, or a brief break away from the screen. Over time, better sleep often reduces the slump, which lets you drop the afternoon coffee.
This is an invented example, not a real person.
Someone drinks three coffees a day, the last at about 4 pm, and takes 45 minutes to fall asleep most nights. They keep a diary for three days, then move the last coffee to 12:30 for a week. They replace the afternoon coffee with a walk and a glass of water. They notice they fall asleep a bit faster by the end of the week, and wake less. They keep the change and move to their next experiment, a steadier wake time. A different person might see no change from the same step, which would also be useful information.
If a single morning coffee seems to affect your night, you may simply clear caffeine slowly. Some medicines, including some oral contraceptives, can slow how fast the body clears it, and pregnancy changes it too. Anxiety can also make the jittery effect of caffeine feel stronger. Age matters as well, and many people find they become more sensitive as they get older. None of this means something is wrong with you. It means your own cut-off may be earlier than average, and that is a normal thing to find out by testing.
Energy drinks can contain a lot of caffeine, and young people are often unaware of how much they are having. If a teenager in your home is sleeping badly and drinking energy drinks late in the day, cutting them out is a sensible first step. Talk it through with them rather than banning it, and see a GP if sleep problems persist, because they can also be a sign of low mood or anxiety.
Caffeine is one piece. Alcohol, nicotine, a busy mind, light, heat and an uneven body clock matter too. If you have cut caffeine and still struggle, look at the others. Our guide to why you can't sleep covers the common causes, and sleep hygiene covers the habits that go together.
If you have tried cutting back for a few weeks and still cannot sleep, if you rely on caffeine to function because you are exhausted, if you have a racing heart, anxiety or jitters, or if low mood is involved, talk to your GP. They can look for other causes and discuss options, including CBT for insomnia.
See your GP if you are having trouble sleeping and your mood is low, you feel restless in bed, or you wake unrefreshed, or if the problem has gone on for weeks. Loud snoring with pauses in breathing, or falling asleep at the wheel, are reasons to go now. If you are thinking about harming yourself, call Lifeline on 13 11 14, or 000 in an emergency. This article is education, not medical advice.
Sources: Sleep Health Foundation, "Ten Tips for a Good Night's Sleep" (sleephealthfoundation.org.au) and "Caffeine, Food, Alcohol, Smoking and Sleep"; healthdirect, "Insomnia" (healthdirect.gov.au).
It can. Caffeine can lighten and shorten sleep even when you drop off easily, so you may wake less rested without realising why.
There is no universal time. Many people with sleep trouble try stopping by early afternoon. Test it for a week to find your own cut-off.
Yes, a small amount. It is much less than regular coffee, but very sensitive people may notice it.
It varies by person. Several hours is typical for many adults, and some can still be active at bedtime if consumed in the afternoon.
Cutting back slowly usually helps. Swap the last drink of the day for decaf, move your cut-off earlier gradually, and keep up water and daylight.
Part of the guide: Caffeine, Alcohol, Melatonin and When to See a GP About Sleep
A gentle, practical week of small habits, about ten minutes a day, with a sleep diary to show what is really going on. Free, plain language, no hype.
Get the free guideA note on care. I'm Nick. This is education, not therapy or medical advice. If you're struggling, Lifeline is 13 11 14, or call 000 in an emergency.