The short answer
There is no universal time before which caffeine is harmless to everyone’s sleep. Its effects depend on the amount, the time until bed and individual characteristics. If sleep is troubling you, a starting point is to limit caffeine from the evening onwards. Look at nighttime awakenings and how rested you feel in the morning, as well as whether you fell asleep. Before deciding to give up coffee entirely, you could change your later cup (Japan’s Ministry of Health, Labour and Welfare sleep information).
Key points
- Both the amount of caffeine and when you take it affect its influence on sleep
- Feeling that you fell asleep does not reveal every possible effect on sleep
- Tea and energy drinks can contain caffeine too
- Start with a later cup and review your sleep and how you feel over several days
- An Apple Watch sleep score or HRV alone cannot establish that caffeine is the cause
1. Look at the dose and time until bed, not just the clock
A coffee at 3 p.m. leaves a different interval before bed for someone who sleeps at 10 p.m. than for someone who sleeps at 1 a.m. Even at the same time, a small cup and a large bottle sipped over a longer period provide different amounts.
Japan’s Ministry of Health, Labour and Welfare recommends limiting caffeine from the evening onwards to support sleep. That is a starting point for reviewing habits. It does not mean any amount before evening will leave sleep unaffected (Ministry sleep information).
People also differ in their sensitivity to caffeine and how quickly caffeine levels fall in the body. A family member being able to sleep after an evening coffee does not mean the same applies to you (FDA).
Try putting three things together: your last caffeine intake, the type and amount of drink, and your planned bedtime. If you sleep during the day because of night work, think about your own sleep time rather than evening as a fixed time of day.
2. Feeling less sleepy does not replace missing sleep
While you are awake, a substance called adenosine builds up in the brain and contributes to the drive towards sleep. Caffeine blocks its action, making you feel less sleepy (US National Heart, Lung, and Blood Institute).
Coffee may make your head feel clearer, but you have not slept during that time. If you repeatedly rely on one more cup to get through the day, look at whether you are allowing enough time for sleep as well as how you drink coffee.
3. ‘I can still fall asleep’ does not tell the whole story
A 2023 analysis combining 24 studies found a tendency towards shorter sleep in conditions involving caffeine. The analysis of sleep duration found an average reduction of about 45 minutes, but it pooled studies with different doses and timings. It does not mean one cup of coffee costs everyone 45 minutes of sleep (Gardiner et al., 2023).
In a 2013 experiment included in that analysis, 12 adults compared taking 400 mg of caffeine at bedtime, 3 hours before bed or 6 hours before bed with taking a caffeine-free pill. Even at 6 hours, device-measured sleep duration was shorter, but the sleep duration participants reported in their sleep diaries showed no statistically clear difference. Perception and measurements do not always agree (Drake et al., 2013).
A study published in 2025 compared conditions in which 23 adult men took 100 mg or 400 mg 4, 8 or 12 hours before bed. Compared with a caffeine-free pill, 400 mg reduced deep sleep and affected other measures even 12 hours before bedtime. With 100 mg, there was no statistically clear difference in the sleep measures examined (Gardiner et al., 2025).
This does not mean 100 mg is fine for everyone or everyone should avoid caffeine for 12 hours before bed. The latter study mainly involved young adult men, who also took a dose equivalent to their usual intake in the morning. The experimental 400 mg was an additional single dose, not the same situation as your usual cup of coffee.
The useful everyday lesson is that both dose and timing matter, and falling asleep alone does not capture the full effect. Also consider awakenings during the night, sleep duration and how rested you feel in the morning.
4. Does it affect habitual coffee drinkers in the same way?
Some studies have found different results. In a 2021 trial, 20 healthy young men who regularly consumed caffeine took 150 mg three times daily for 9 days. With 8 hours between the final dose and bedtime, sleep duration and perceived sleep quality did not differ clearly from the caffeine-free pill condition (Weibel et al., 2021).
Some brain-wave measures did change, however, so this does not establish a complete absence of effects. It was a small study of habitual consumers who slept well, all men, and may not apply equally to caffeine-sensitive people.
Taking a large amount at once differs from spreading it through the day. Habitual consumers also differ from people who rarely use caffeine. With these different conditions in mind, do not turn a study’s numbers directly into your own cut-off time. Consider your current drinking habits alongside the sleep problems you are experiencing.
5. Check the type of tea if you switch drinks
Switching from coffee to tea does not necessarily reduce caffeine. Green tea, black tea and energy drinks can contain it too. Even within the same drink category, amounts differ by product, preparation and container size (FDA).
If the caffeine content is listed, check whether it is per 100 mL or per bottle. For example, drinking 500 mL of a product containing 20 mg per 100 mL gives a total of 100 mg. This is a calculation example, not a standard amount for any particular drink.
If you do not know the amount, a note such as ‘3 p.m., small latte from my usual café’ is fine. You do not need perfect calculations from the start to learn about your drinking habits.
Decaf has less caffeine, but is not necessarily caffeine-free. Check the product information when choosing a drink for times when you want to avoid caffeine (FDA).
6. Start by changing your later cup
Changing your whole routine at once can be hard to sustain. Here is one manageable way to review your habits.
Make a brief note of your usual drinks
Record the type, amount and timing of coffee or tea. What you can remember is enough. You do not need to keep following a habit that concerns you just to collect records.
Choose a later cup to change
For example, replace an evening coffee with a lower-caffeine or caffeine-free drink. You could also make the cup smaller. You can still keep and enjoy the break itself.
Record how you feel first the next morning
Briefly note how rested you feel, whether you woke during the night and your morning sleepiness. If you use Apple Watch, look at sleep duration and other records afterwards.
Review after several days to about a week
Rather than deciding after one night, compare days with similar routines. Note anything unusual, such as overtime, alcohol or changes in your health, to make the comparison easier.
7. With Apple Watch or Feelmo, look at your routine as well as the score
If you use Apple Watch, look at sleep duration and time awake during the night alongside your notes. The Apple Support guide in the references explains how to view the records.
You cannot conclude that yesterday’s coffee caused a low deep-sleep reading. Apple Watch estimates sleep stages from sensors. A single night’s sleep score or HRV does not isolate caffeine’s effects either (Feelmo sleep guide).
In a short Feelmo note, you can record observations such as ‘Switched evening coffee to decaf’ or ‘A little sleepy this morning’. Paper or your usual notes app works too (Feelmo Mood Log guide).
The aim is not simply to raise a score, but to find a way of enjoying drinks that fits how you want to feel day to day. If recording becomes a burden, you do not need detailed notes every day.
8. When sleep problems continue after changing your drinks
Trouble sleeping, feeling unrefreshed despite allowing enough time for sleep, or daytime sleepiness that interferes with work or chores: if these continue, consult a healthcare professional rather than assuming coffee is the only issue. You do not need to wait for a complete set of records (Japan’s Ministry of Health, Labour and Welfare guidance on sleep).
If you are pregnant or breastfeeding, have a medical condition or take medication, ask your doctor or pharmacist how much you need to limit caffeine (FDA).
References
- Gardiner C, et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis — Sleep Medicine Reviews, 69, 101764. DOI: 10.1016/j.smrv.2023.101764
- Drake C, Roehrs T, Shambroom J, Roth T. (2013). Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed — Journal of Clinical Sleep Medicine, 9(11), 1195–1200. DOI: 10.5664/jcsm.3170
- Gardiner C, et al. (2025). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial — Sleep, 48(4), zsae230. DOI: 10.1093/sleep/zsae230 (published online in 2024)
- Weibel J, et al. (2021). The impact of daily caffeine intake on nighttime sleep in young adult men — Scientific Reports, 11, 4668. DOI: 10.1038/s41598-021-84088-x
- Still tired after sleeping? Check your sleep quality — Japan’s Ministry of Health, Labour and Welfare
- How Sleep Works — Your Sleep/Wake Cycle — US National Heart, Lung, and Blood Institute (NHLBI)
- Spilling the Beans: How Much Caffeine is Too Much? — US Food and Drug Administration (FDA)
- Track your sleep with Apple Watch and use Sleep on iPhone — Apple Support
