Many people like to end the day with something sweet: A few squares of chocolate, a cookie, a bowl of grapes or watermelon next to the TV, or a little something before getting into bed. But can sugar itself actually interfere with sleep?
Studies on the subject point to an association between a diet containing a lot of added sugar and refined carbohydrates and poorer sleep quality, as well as more symptoms of insomnia. The composition of the evening snack, the type of carbohydrates we eat, meal times, and even the overall dietary pattern throughout the day may also be linked to sleep quality.
So what should you really know about pre-bedtime food?
Plenty of sweets and refined carbohydrates
The connection between sweets and sleep is more interesting than commonly thought. Studies have found that a diet containing higher amounts of added sugar, processed foods, and high-glycemic index carbohydrates is associated with poorer sleep quality and more insomnia symptoms. Studies examine the overall dietary pattern, so it is more accurate to look at the habit: Whether most of the evening consists of cookies, chocolate, snacks, and sweet breakfast cereal, or a meal and snacks that keep you full over time. A review of studies on the topic found that processed foods rich in free sugars were linked to poorer sleep metrics.
An evening snack that also contains protein, fat, or fiber
If you crave something sweet in the evening, it is worth checking whether it is real hunger or mainly a desire to snack. A candy, cookie, or a few biscuits provide mostly available carbohydrates, and therefore are usually less filling. In contrast, combining a carbohydrate with protein, fat, or fiber slows gastric emptying and carbohydrate absorption, and can moderate the rise in blood sugar levels after eating – especially if you go to sleep shortly after.
A snack with such a combination can be particularly suitable for those who tend to have sharp spikes in sugar, prediabetes, or diabetes, naturally as part of the overall menu and according to the amount of carbohydrates. You can choose, for example: Yogurt with a few nuts or almonds, a slice of whole-wheat bread with cheese, fruit with a few nuts, yogurt with a tablespoon of oatmeal.
There is no need to go to sleep hungry in the name of a diet. If it is something small – you can and should eat it even a quarter of an hour before going to sleep, and not go to bed with a stomach rumbling from hunger. On the other hand, a large and heavy meal right before sleep can also strain the digestive system. The goal is to choose, when necessary, a small and filling snack with a more balanced composition.
Tryptophan and the connection to melatonin
Tryptophan is an essential amino acid that we must get from food. It serves in the body as a precursor for the production of serotonin, and subsequently melatonin, one of the key hormones regulating the sleep–wake cycle.
Contrary to the myth, where many think serotonin is created after eating carbohydrates, the precursor tryptophan is actually found mainly in proteins, including dairy products, eggs, nuts, almonds, oatmeal, legumes, and soy.
However, keep things in perspective: Eating food that contains tryptophan does not act like a sleeping pill, and there is no need to start searching for one specific food before bed. Tryptophan is another example of how the composition of the entire diet can integrate into biological processes related to sleep.
A Mediterranean diet is also linked to better sleep
The Mediterranean diet already has a long list of health benefits, and it seems an association with sleep quality can be added to it as well. This menu is based on vegetables and fruits, legumes, whole grains, nuts, olive oil, and less-processed foods.
A large review and meta-analysis published in 2025 that included 62 studies and over 328,000 participants found a link between adhering to a Mediterranean diet and sufficient sleep as well as better sleep quality. Additional reviews reached a similar conclusion: The closer the diet is to the Mediterranean pattern, the less poor-quality sleep and fewer insomnia symptoms tend to be observed. To me, this is also a more practical message than looking for a "sleep food": It is worth improving the quality of the entire menu.
How long does caffeine affect you?
Caffeine blocks adenosine receptors in the body, the substance that makes us feel tired. The recommendation is therefore to avoid drinking it starting from the early afternoon hours, and not just before sleep itself. About 5 hours after drinking, about half the amount of caffeine is still in the body, and even after 10 hours, about a quarter of it still remains. Therefore, a cup of coffee drunk at 4:00 p.m. is still partially active at the time you go to sleep.
So true, those who drink coffee regularly for years may feel its stimulating effect less, but that does not necessarily mean caffeine no longer affects their sleep. Even when falling asleep without difficulty, caffeine in late hours may shorten sleep duration, reduce deep sleep, and increase night awakenings.
It is important to remember that caffeine is not found only in coffee. A cup of cocoa contains about 5 to 10 mg of caffeine, a glass of cola about 30 to 35 mg, compared to a cup of coffee which contains about 80 to 100 mg. In other words, the amounts are significantly smaller, but they do add up to the daily total, and those sensitive to caffeine should take this into account.
Alcohol – sleep-inducing at first, but ruins the rest of the night
Many people are sure that a glass of wine "helps you sleep." It can indeed cause drowsiness and faster sleep onset, but later in the night, alcohol damages sleep continuity and quality and can cause more awakenings.
Why does this happen? Because as the alcohol breaks down and its blood level drops, its sedative effect weakens and there is increased arousal of the nervous system. Additionally, it disrupts sleep architecture, including REM sleep, which is why in the second half of the night sleep tends to be lighter and more fragmented.
A practical tip: Do not use alcohol as a "sleeping pill," and especially for those who wake up in the middle of the night – check what happens during a period without alcohol in the evening.
Pay attention to food that is liquid
Food can also be considered drink. It is not only glasses of water that affect the need to get up to use the bathroom at night. Foods and beverages containing a lot of liquid can also add a significant amount of water specifically in the evening hours.
Watermelon or melon, soup, large yogurt, popsicle... – all can contribute to the fluid balance just like drinking. 500 grams of watermelon contain about 450 ml of water. If you eat a large bowl right before bed, in terms of fluid balance, it is almost like drinking two glasses of water.
So a large bowl of watermelon in the hour, two, or three hours before bed can certainly contribute to waking up for the bathroom at night, precisely because it can introduce several hundred ml of water without a person feeling that they "drank." Those who tend to wake up at night to use the bathroom can try moving larger quantities to earlier hours of the day, and in the evening choose a smaller portion.
Finally, I want to address something unrelated to nutrition – screens and sleep. There is evidence that strong light in the evening, and particularly light rich in blue wavelengths, can suppress melatonin secretion and alter circadian timing under laboratory conditions (for example, tablets held close to the face for consecutive hours). But when asking the more practical question: Does regular viewing of a phone or TV in the evening really harm sleep?
The answer is not unambiguous. There are no consistent results in studies, and only in some cases was a impairment found in sleep duration, time to fall asleep, or sleep quality. What was found is that screen use before bed may lead to shorter and later sleep. But how significant is this effect? A recent review examining the topic found that a bright screen delayed sleep onset by only about 3 minutes compared to a dim screen.
Right now it is difficult to know how much of this connection stems from the light itself, and how much simply from the fact that the screen causes us to stay awake longer, get exposed to content that might interest us, stimulate us, or cause us to postpone bedtime. And it is important to add this too – there are people like me who simply fall asleep while watching TV. Sometimes without the TV, falling asleep is actually harder.
Click here for Dr. Maya Rosman's YouTube channel, featuring all tip videos