How Food Affects Your Sleep

Updated: 3 hours ago
Last updated: October 16, 2026

How food affects sleep depends on which part of the night you look at. In controlled studies, caffeine cut deep sleep by about 11 minutes and added about 12 minutes awake, alcohol pushed REM back by about 18 minutes and shortened it by about 11, and higher carb meals added roughly 9 minutes of REM while lower carb meals added roughly 8 minutes of deep sleep. Some popular sleep foods held up less well. Sixty grams of almonds a day for five months made no measurable difference to any sleep stage, even though the people eating them said they slept better. Below is every food and drink we found tested against each stage of sleep, graded by how strong the evidence is.
Want to look up one food at a time? The how food affects sleep tool sorts every graded finding by sleep stage, with industry funding flagged.
I went looking for foods that had actually been tested against sleep stages, not just against how people said they slept. That split turned out to matter more than any single food. Several items that top most foods for sleep lists changed how people rated their sleep without changing what the sleep recording showed, so this post keeps the two apart.
How to read the evidence grades
Every row below carries one of four grades, so you can see how much weight a result can hold.
Strong means a meta-analysis or several randomized controlled trials pointing the same way.
Moderate means one solid controlled study, or a pooled analysis of small ones.
Observational means a link found in survey or tracking data. It shows two things move together, not that one causes the other.
Weak means a tiny or uncontrolled study. Treat it as a lead, not a finding.
Most of the studies measured sleep with polysomnography (PSG), the sleep lab standard that reads brain waves directly. Where a study used a wrist tracker, an EEG headband or a sleep diary instead, the table says so. Industry funding is flagged wherever it applies.
How food affects sleep: the short version
This is the whole picture in one table. Each cell is the effect on that part of the night. The stage sections below carry the numbers and the sources.
Food or drink | REM sleep | Deep sleep | Falling asleep | Staying asleep |
Caffeine | No change | Less, about 11 min | Slower, about 9 min | More waking, about 12 min |
Alcohol | Less and later, from about 2 drinks | No net gain | Faster only at about 5+ drinks | No clear effect |
Higher carb meals | More, about 9 min | Less than low carb | Faster (high GI dinner, 4h before bed) | Not covered |
Lower carb or keto | Less than high carb | More, about 8 min | Not covered | Not covered |
High protein, lower carb | Less, about 9 min | Not covered | Slower, about 4 min | Not covered |
Late dinner | No change | Not covered | No change | Mixed |
Almonds | No change | Not covered | Not covered | No measured change |
Tart cherry juice | Not covered | Not covered | Not covered | Mixed |
Daytime fasting | Less | Not covered | Not covered | Not covered |
Week of junk food | Not covered | Shallower, same minutes | Not covered | Not covered |
Fiber | Not covered | More (observational) | Not covered | Not covered |
Saturated fat and sugar | Not covered | Less with more saturated fat (observational) | Not covered | More wake ups with more sugar (observational) |
Fruit and vegetables | Not covered | Not covered | Not covered | Less fragmented (observational) |
Spicy dinner | Not covered | Less (weak) | Not covered | Not covered |
Under-eating for training | Not covered | Less (observational) | Not covered | Not covered |
Alpha-lactalbumin (milk protein) | Not covered | Not covered | Faster, mixed | Not covered |
Energy drinks | Not covered | Not covered | Slower (observational) | Not covered |
Mediterranean diet | Not covered | Not covered | Faster, self-reported only | Not covered |
Foods that affect REM sleep
REM is the stage most tied to dreaming, and most of it happens in the second half of the night. The clearest food effect on REM is alcohol. The second is how much of your plate is carbohydrate.
Food or drink | Effect | Evidence | What happened |
Alcohol | Less REM, starts later | Strong: meta-analysis of 27 studies in healthy adults (Gardiner 2025) | REM started about 18 min later and ran about 11 min shorter. The delay began around 2 drinks and the REM loss around 3, and each extra drink cut more. |
Higher carb diet | Slightly more REM | Moderate: meta-analysis of 11 small studies, n=179 (Vlahoyiannis 2021) | About 9 min more REM than low carb, from single meals up to 4 day diets. Low carb shifted sleep toward deep sleep instead. Time to first REM did not change. |
High protein, lower carb diet | Less REM, starts later | Moderate: randomized crossover, n=24 healthy young men, home PSG, 3 days per diet (Saidi 2022) | About 9 min less REM than a higher carb diet with the same calories. First REM also came about 15 min later. |
Daytime fasting (Ramadan style) | Less REM | Moderate: two small PSG studies of 8 healthy men each (BaHammam 2013; Roky 2001) | REM was 18.6% of sleep while fasting vs 25.6% before, with sleep times and calories held fixed. Fasting outside Ramadan cut REM by a similar amount. The 3:30am wake up to eat may play a part. |
Caffeine | No change | Strong: meta-analysis, 17 to 19 studies for REM outcomes (Gardiner 2023) | No change in REM minutes, REM share or time to first REM. |
Late dinner (10pm vs 6pm) | No change | Moderate: randomized crossover, n=20 healthy adults, lab PSG (Gu 2020) | REM was 20.8% vs 20.6% of sleep. Eating dinner an hour before bed did not reduce REM. |
Almonds, 60g a day for 5 months | No change | Moderate: RCT, n=175 adults with poor sleep, home PSG (Desai 2026, funded by the Almond Board of California) | No difference in REM minutes or time to first REM vs an equal calorie snack. The almond group did report sleeping better. |
Not every study agrees on carbs. One small older trial in cyclists and one observational study found protein or fat, not carbs, tracking with more REM, and the cyclist trial also found more deep sleep on high carb. The newer controlled trial points the other way on protein: a high protein diet cut REM by about 9 minutes.
Caffeine leaving REM alone is the useful surprise here. It is the biggest food lever on deep sleep, yet across 17 to 19 studies it did not touch REM. For the non-food factors ranked against each other, see what influences REM sleep, ranked by evidence.
Foods that affect deep sleep
Deep sleep (N3, or slow wave sleep) is where caffeine does most of its damage. Carbohydrate shows up again too, pulling the opposite way to REM.
Food or drink | Effect | Evidence | What happened |
Caffeine | Less deep sleep | Strong: meta-analysis of 24 studies (Gardiner 2023); dose detail from a double-blind crossover, n=23 men, home forehead EEG (Gardiner 2025) | About 11 min less deep sleep on average. In the trial, 400mg 4h before bed cut 29.7 min, and still cut 20.6 min at 12h. 100mg had no measurable effect at any timing. |
Lower carb diet | More deep sleep | Moderate: meta-analysis of 11 small studies, 27 trial arms (Vlahoyiannis 2021) | About 8 min more deep sleep. Same analysis that found more REM on higher carb. |
Very low carb or keto | More deep sleep | Weak: n=14 healthy men, PSG, not randomized (Afaghi 2008) | Deep sleep was about 18% of the night vs 14% on a high carb, low fat diet. The normal diet night always came first. |
A week of junk food (high fat, high sugar) | Shallower deep sleep | Moderate: randomized crossover, n=15 healthy men, lab PSG, same calories (Brandão 2023) | Compared with a low fat, low sugar week, time in deep sleep did not change, but the deep sleep was shallower on EEG. |
Fiber and saturated fat | More and less deep sleep | Observational: n=26, sleep lab PSG (St-Onge 2016); fiber link repeated in n=46, lab PSG (Spaeth 2017) | On a free eating day, more fiber predicted more deep sleep that night and more saturated fat predicted less. |
Alcohol, about 5 drinks | No net gain | Moderate: n=22 aged 18 to 21, lab PSG (Chan 2013); randomized crossover, n=30, 3 nights of lab PSG (McCullar 2024) | More deep sleep in the first half of the night, less in the second half, more time awake. Total deep sleep did not go up and REM went down. |
Spicy dinner (Tabasco and mustard) | Less deep sleep | Weak: n=6 men, PSG (Edwards 1992) | Less deep sleep and more time awake, possibly from higher body temperature early in the night. Tiny study. |
Not eating enough for your training | Less deep sleep | Observational: n=26 college swimmers, WHOOP plus MyFitnessPal logs, 3 matched days (Lundstrom 2026) | Swimmers who ate more relative to their training got more hours of deep sleep. 69% were under-eating. Deep sleep as a share of the night did not change. |
The caffeine dose matters more than the cup. In the 23 person trial, 400mg (about 4 standard cups of coffee) taken 4 hours before bed cut deep sleep by 29.7 minutes, and the same dose still cut it by 20.6 minutes when taken 12 hours before bed. 100mg had no measurable effect at any timing. A big total dose looks like the problem, even early in the day.
Alcohol looks like it deepens sleep, and early on it does. At about 5 drinks, deep sleep rose in the first half of the night and fell in the second, time awake went up, and total deep sleep did not increase. REM went down. The same pattern held over 3 nights in a row.
The junk food result is a good example of what a wearable can miss. A week of high fat, high sugar eating left deep sleep minutes unchanged but made that deep sleep shallower on EEG. My read is that a ring or watch would probably report the same deep sleep minutes on both weeks.
For the full list of deep sleep factors beyond diet, including exercise and room temperature, see how to increase deep sleep, factors ranked.
Averages are a starting point, not your answer. A 9 minute REM shift is a study mean, and some people move far more than that while others do not move at all.
Foods that help you fall asleep faster
Sleep latency, the time it takes to fall asleep, has more food results than any other stage, and more of them are self-reported. Watch the evidence column.
Food or drink | Effect | Evidence | What happened |
Caffeine | Slower | Strong: meta-analysis, 19 studies for this outcome, mostly PSG (Gardiner 2023) | Adds about 9 min to falling asleep on average. Dose and timing did not change that. |
Alcohol | Faster only at high dose | Strong: meta-analysis of 27 studies in healthy adults (Gardiner 2025) | Only about 5+ drinks shortened time to fall asleep, while REM was disrupted from about 2 drinks. |
High GI carb meal, 4h before bed | Faster | Moderate: randomized order crossover, n=12 healthy men (Afaghi 2007) | A jasmine rice dinner: 9.0 min to fall asleep vs 17.5 min on low GI rice. The same meal 1h before bed gave 14.6 min. |
High protein, lower carb diet | Slower | Moderate: randomized crossover, n=24 healthy young men, home PSG (Saidi 2022) | About 4 min longer to fall asleep than a higher carb diet with the same calories. On the higher carb diet it dropped from 15.8 to 11.4 min. |
Alpha-lactalbumin drink (milk protein) before bed | Faster, mixed | Moderate: review of 8 studies, 5 positive (Barnard 2024); RCT in female rugby players, wrist actigraphy, 12 with usable data (Gratwicke 2022) | In the rugby trial, 11.6 and 17.0 min vs about 21 to 22 min on a whey control. Two other trials (6 + 6 cyclists, and 24 adults over 7 nights) found no effect. |
Energy drinks | Slower | Observational: n=53,226 Norwegian students, self-report (Kaldenbach 2024) | Daily drinkers had about 1.8 to 1.9x the risk of taking over 2 hours to fall asleep vs never or seldom. Risk rose from just 1 to 3 times a month. Adjusted for age only. |
Mediterranean diet | Faster, self-reported only | Observational: review of 20 studies (Fallah 2024), a tracker cohort (Verkaar 2024) and a feeding RCT (O'Connor 2018) | All 3 questionnaire studies linked it to falling asleep faster. A 533 person wrist tracker study and a 41 person 5 week feeding trial found no measured change. |
Timing changed the carb result. The same jasmine rice dinner got people to sleep in 9.0 minutes when eaten 4 hours before bed, but 14.6 minutes when eaten 1 hour before. If a carb heavier dinner is something you want to test, earlier looks better than later.
Alcohol is the trap here. It only shortened the time to fall asleep at around 5 or more drinks, while REM was already being disrupted from about 2. More on every factor, food or not, in how to fall asleep faster, ranked by evidence.
Foods that affect staying asleep
Time spent awake after you first fall asleep is called WASO (wake after sleep onset). It is the stage behind the 3am wake up, and it is where the food evidence is the most mixed.
Food or drink | Effect | Evidence | What happened |
Caffeine | More waking | Strong: meta-analysis, 13 studies for this outcome (Gardiner 2023) | About 12 extra minutes awake during the night (+11.8 min). |
Tart cherry juice | Less waking, mixed | Moderate: RCT crossover, n=15 older adults with insomnia, sleep diary (Pigeon 2010, funded entirely by the juice maker) | 62 min awake on cherry vs 79 min on placebo, about 17 min less. Later trials were mixed. |
Sugar | More wake ups | Observational: n=26, sleep lab PSG (St-Onge 2016) | A higher share of calories from sugar on a free eating day predicted more arousals that night. |
Fruit and vegetables | Less fragmented sleep | Observational: n=34 mostly young men, 201 nights, wrist actigraphy (Boege 2025) | 5 cups a day vs none lined up with 16% less fragmented sleep. The link weakened and was no longer significant after accounting for total calories. |
Eating within 1h of bed | More waking, self-reported | Observational: n=124,239, US time use survey (Iao 2022) | About 2 to 2.6x the odds of reporting 30+ min awake in the night. The same people also slept 25 to 35 min longer. |
Late dinner (1h vs 5h before bed), single night | No effect | Moderate: randomized crossover, n=20 healthy adults, lab PSG (Gu 2020) | Eating late did not change time awake, sleep efficiency or sleep stages. |
Late dinner (1h vs 5h before bed), 4 days | More waking | Moderate: randomized crossover, n=13 young women, home EEG (Enomoto 2026, funded by Yazuya, a food company) | Time awake was 29 vs 16 min, with more arousals and about 26 min less sleep. Time to fall asleep did not change. |
Almonds, 60g a day for 5 months | No measured change | Moderate: RCT, n=175 adults with poor sleep, home PSG (Desai 2026, funded by the Almond Board of California) | No difference in time awake or sleep efficiency vs an equal calorie snack. Only self-reported sleep efficiency improved. |
Alcohol | No clear effect | Strong: meta-analysis of lab studies in healthy adults (Gardiner 2025); tracker study, n=785 (Spadola 2019) | No clear change in time awake (+4 min, 12 studies) or sleep efficiency (-0.7%, 24 studies), at any dose. One large tracker study saw about 1 point lower efficiency. |
Tart cherry juice shows why funding and replication matter. The headline 17 minute result came from a trial funded entirely by the juice maker. Later trials split. An 8 person juice trial in older adults with insomnia found 84 minutes more sleep in the lab, and a 2012 trial in 20 healthy adults found more sleep on actigraphy. A 2024 capsule trial (n=34, EEG headband and Fitbit) and a 2022 diary trial in 44 healthy adults found nothing.
Almonds tell the same story from the other direction. In 175 adults with poor sleep, five months of almonds changed nothing a sleep recording could see, and only self-reported sleep efficiency improved. The study was funded by the Almond Board of California and still reported the null result. For the non-food side of night waking, see how to stay asleep, factors ranked by evidence.
Does eating before bed hurt your sleep?
This is the question people ask most, and the honest answer is that the studies disagree.
A large survey says yes. In 124,239 people from a US time use survey, eating within an hour of bed came with about 2 to 2.6 times the odds of reporting 30+ minutes awake in the night. The same people also slept 25 to 35 minutes longer.
One lab night says no. When 20 healthy adults were randomized to dinner 1 hour or 5 hours before bed, eating late did not change time awake, sleep efficiency or sleep stages. That suggests the survey link may be about who eats late, not the food itself.
Four nights at home say yes again. In 13 young women over 4 days, a late dinner meant 29 vs 16 minutes awake, more arousals and about 26 minutes less sleep. That study was funded by a food company, and it disagrees with the single night lab result.
Put together, one late dinner is unlikely to wreck a night, but a habit of eating right before bed may add up over several nights. It is also one of the easiest things to check in your own data, because the timing is already sitting in your food log.
What your wearable will and will not show you
Most effects in these tables run from about 4 to 30 minutes a night. That is real but small, and consumer wearables estimate sleep stages from movement and heart rate rather than reading brain waves the way a sleep lab does. Three patterns from this research help when you read your own numbers.
Feeling and measuring can split. Almonds and the Mediterranean diet both produced better self-reported sleep without a measured change. Your morning feeling and your ring's stage chart are answering different questions.
Minutes can hide quality. The junk food week changed how deep the deep sleep was, not how long it lasted, and minutes are what a wearable reports.
One night is not a pattern. The late dinner studies only disagreed once one of them ran for 4 days instead of 1. Food effects on sleep tend to show up across repeated nights, so a single bad score after a big dinner proves very little.
If you want to check which of these show up for you, we walked through which foods affect your sleep and HRV and how to find out using your own logs.
What about kiwi, warm milk and bananas?
A few foods that headline almost every foods for sleep list are missing here, including kiwi, bananas, chamomile and foods sold as high in magnesium. They are not in the tables because we have not finished grading their evidence to the same standard as everything above, and we would rather leave a gap than repeat a claim we have not checked.
Warm milk is the partial exception. The closest tested ingredient is alpha-lactalbumin, a milk protein, which sped up falling asleep in 5 of 8 studies but not in the rest. That was a concentrated drink, not a glass of milk.
The bottom line
How food affects your sleep comes down to which stage you care about. Caffeine is the clearest cost to deep sleep and night waking, alcohol the clearest cost to REM, and carbohydrate trades a little REM against a little deep sleep depending on which way you lean. Most popular sleep foods have either not been tested against sleep stages, or did not move them when they were.
Common questions
How does food affect sleep?
It depends on the sleep stage. In controlled studies, caffeine cut deep sleep by about 11 minutes and added about 12 minutes awake, alcohol delayed and shortened REM, and higher carb meals added about 9 minutes of REM while lower carb meals added about 8 minutes of deep sleep.
What foods increase deep sleep?
Lower carb meals added about 8 minutes of deep sleep in a meta-analysis of 11 small studies, and higher fiber intake was linked to more deep sleep in two sleep lab studies. Avoiding big caffeine doses matters more: 400mg cut deep sleep by up to about 30 minutes.
What foods increase REM sleep?
Higher carb meals gave about 9 minutes more REM than low carb in a meta-analysis of 11 small studies. Alcohol is the biggest REM reducer, delaying REM by about 18 minutes and shortening it by about 11.
Does caffeine affect REM sleep?
Not measurably. A meta-analysis of 17 to 19 studies found no change in REM. Caffeine's cost lands on deep sleep, falling asleep and night waking instead.
Does eating late ruin your sleep?
Not reliably after one night. A lab study of 20 adults found no change from eating 1 hour vs 5 hours before bed, but a 4 day home study found about 13 more minutes awake, and a large survey linked eating within an hour of bed to more night waking.
Does tart cherry juice help you stay asleep?
The results are mixed. The best known trial found about 17 fewer minutes awake but was funded entirely by the juice maker, and two later trials, in 2022 and 2024, found no effect.
Do almonds help you sleep?
Not on measured sleep. In a 5 month trial of 175 adults with poor sleep, 60g of almonds a day made no difference to any sleep stage or time awake, although people reported sleeping better. The study was funded by the Almond Board of California.
Key sources: Gardiner 2023 (Sleep Medicine Reviews, caffeine meta-analysis), Gardiner 2025 (Sleep, caffeine dose and timing trial), Gardiner 2025 (Sleep Medicine Reviews, alcohol meta-analysis), Vlahoyiannis 2021 (Nutrients, carbohydrate meta-analysis), Saidi 2022 (Nutrients), Gu 2020 (Journal of Clinical Endocrinology and Metabolism), Enomoto 2026 (Journal of Physiological Anthropology, funded by Yazuya), Desai 2026 (Frontiers in Nutrition, funded by the Almond Board of California), Pigeon 2010 (Journal of Medicinal Food, funded by the juice maker), St-Onge 2016 (Journal of Clinical Sleep Medicine), Afaghi 2007 (American Journal of Clinical Nutrition), Brandão 2023 (Obesity), McCullar 2024 (Sleep), Iao 2022 (British Journal of Nutrition), Barnard 2024 (Journal of Sleep Research). Every other study is linked in its table row.
Disclaimer: Kygo is a personal data aggregation and insights platform designed for informational purposes only. The information provided by Kygo, including correlations, patterns, and trends identified in your data, does not constitute medical advice, diagnosis, or treatment. Always consult a licensed healthcare provider with any questions regarding medical conditions.
Have you noticed one food or drink that reliably shifts your deep sleep or REM? Let me know in the comments, I read them all.