You wake up at 3 AM for no apparent reason, or it takes you an hour to fall asleep after an evening out. Before blaming stress or your mattress, take a look at what you ate and drank in the hours prior. Diet is one of the most underestimated levers of sleep quality, and its effects are documented by reputable organizations such as the INSV and Inserm.

This guide covers what science knows today: stimulants that delay falling asleep, alcohol that deceives about its benefits, and foods that, on the contrary, can support natural sleep onset.


Caffeine: The Discreet Enemy of Your Night

Caffeine blocks adenosine receptors, the molecule that signals fatigue to the brain. Its half-life is about 5 to 6 hours on average: at 10 PM, a cup consumed at 5 PM is still half present in your blood.

In practical terms, this means that an espresso taken in the mid-afternoon is not insignificant for bedtime. The EFSA recommends not exceeding 400 mg of caffeine per day for a healthy adult — about four espressos, but individual thresholds vary considerably based on genetics and habits.

Caffeine not only prevents falling asleep: it also fragments sleep and induces micro-awakenings. This second effect often goes unnoticed. You think you are sleeping, but deep sleep is reduced, and waking up is laborious.

Caffeine is not limited to coffee. It is present in tea, chocolate, and most energy or cola-based drinks. Green tea, for example, contains a non-negligible amount — much less than an espresso, but enough to disturb sensitive sleepers. Mate, less common, is also loaded with caffeine.

Practical Rule: For most people, cutting off caffeine after 2 PM-3 PM reduces the risk of interfering with sleep onset. If you are particularly sensitive or if you go to bed early, move this limit to 1 PM.


Tea: Not Entirely Innocent

Tea deserves a separate paragraph because its image as a “soothing” drink is partially misleading. A black tea contains between 40 and 70 mg of caffeine per cup depending on the infusion. Green tea contains less but remains stimulating.

Theanine, an amino acid naturally present in tea, has documented relaxing properties — it partially mitigates the stimulating effect of caffeine. But this mitigation does not fully compensate, especially in the evening. Herbal teas without caffeine (verbena, chamomile, lemon balm, valerian) remain the best choice if you want a warm drink after 5 PM.


Alcohol: The Trap of the “Drink to Sleep”

This is probably the most widespread misunderstanding regarding sleep. Although alcohol objectively facilitates the onset of sleep, it significantly alters its structure.

Alcohol allows you to fall asleep faster and sleep more deeply in the first half of the night, but it reduces the duration of REM sleep: this phase is essential for memory consolidation, emotional processing, and mental recovery. Fragmentation is particularly marked in the latter part of the night, with an increase in deep slow-wave sleep in the early night and a decrease in REM sleep.

The result: you fall asleep easily, sleep heavily for the first few hours, then wake up, often between 3 AM and 5 AM, in fragmented, restless sleep, with no possibility of really falling back into deep sleep. This is the biochemistry of the day after a party, even after just one moderate evening.

Alcohol also worsens nighttime respiratory disorders. In people who snore or suffer from sleep apnea, even mild, a drink in the evening can push a borderline situation into more frequent and longer apnea episodes.


The Evening Meal: Time, Quantity, Composition

Digestion and sleep share the same hours but are difficult to reconcile at full throttle. A late and heavy dinner mobilizes the digestive system at a time when the body is trying to slow down. Reflux, bloating, a feeling of heaviness: all obstacles to falling asleep.

Timing. Ideally, dinner should be two to three hours before bedtime. This is not always possible with work constraints, but it is the window to aim for. Eating at 11 PM to sleep at midnight is asking your body to manage two contradictory efforts at the same time.

Heavy fats and proteins. A steak and fries or a generous pizza late in the evening prolongs digestion for hours. Excess saturated fats are particularly slow to process and can cause acid reflux when lying down.

Spices and spicy sauces. They can cause heartburn and, in some people, a slight increase in body temperature: the opposite of what the body is trying to do when falling asleep (core temperature naturally decreases as sleep approaches).

Excessive simple sugars. A glycemic spike followed by a sharp drop in the middle of the night can cause waking. This phenomenon is less known but documented, especially in people with prediabetes or variable insulin sensitivity.


What Helps: Sleep-Friendly Foods

Diet is not just a list of sleep enemies. Some foods actively support the biological mechanisms of falling asleep.

Tryptophan is an essential amino acid necessary for the synthesis of serotonin, which is responsible for the secretion of melatonin, the so-called sleep hormone. It is found in poultry (turkey, chicken), eggs, dairy products, legumes, and nuts like cashews or almonds.

But tryptophan does not easily cross the blood-brain barrier on its own. Carbohydrates play a key role: they help activate tryptophan, which will then allow the production of serotonin and then melatonin. In practical terms, pairing a source of tryptophan with carbohydrates of moderate glycemic index (brown rice, whole grain bread, sweet potato) promotes this passage. This is one of the reasons why a balanced dinner, not too heavy, but also not a pure protein meal without carbohydrates, supports sleep better than a plate of meat alone.

Micronutrients Not to Neglect

Magnesium plays a role in stress regulation and muscle relaxation. Leafy green vegetables (spinach, Swiss chard), nuts, legumes, and dark chocolate are good sources. A magnesium deficiency is common in the French population and can contribute to restless nights or nighttime cramps.

Calcium, present in dairy products and green vegetables, contributes to the synthesis of melatonin. Vitamin B6, found in poultry, fish, and bananas, is an essential cofactor in the conversion of tryptophan to serotonin.

Evening Warm Milk: Myth or Reality?

A bit of both. Milk does indeed contain tryptophan and calcium. But the amount ingested in a glass is too low to produce a measurable pharmacological effect. What works is probably the warmth of the drink (which facilitates relaxation), the ritual itself, and the absence of caffeine. Drinking warm milk or herbal tea in the evening is not a miracle solution, but it is a good habit in a broader context.


What You Eat Throughout the Day Also Matters

It would be too reductive to focus solely on dinner. The diet throughout the entire day influences the quality of nighttime sleep. A too-frugal lunch can lead to hypoglycemia in the afternoon, generate fatigue, and disrupt appetite and satiety signals in the evening.

A chronically poor diet in micronutrients (vitamin D, iron, magnesium) weakens the biological mechanisms of sleep in the long term. This is not a cause of acute insomnia but an aggravating factor over time.

Hydration also deserves mention. Going to bed dehydrated promotes cramps and nighttime awakenings with a dry mouth. Conversely, drinking too much just before sleeping multiplies trips to the bathroom. The balance: stay well-hydrated during the day, moderate from 8 PM.


In Practice: The Most Effective Adjustments

No need to change everything at once. Here are the modifications that have the most impact for the majority of sleepers, ranked by priority:

  1. Stop caffeine after 2 PM-3 PM, regardless of the source. This is often the quickest change to produce a visible effect.
  2. Eliminate or reduce alcohol in the evening, or at least do not take it alone as a sleep aid.
  3. Dinner two hours before bedtime, with a complete meal but not excessively fatty or spicy.
  4. Include a source of tryptophan and complex carbohydrates at dinner: a chicken fillet with brown rice and vegetables, for example.
  5. End the evening with a caffeine-free warm drink (herbal tea, warm milk) rather than tea or coffee.

These adjustments do not replace medical management in cases of chronic insomnia, but they provide a solid foundation for most people looking to improve their sleep without medication.

To learn more about favorable habits for rest, find our other tips in our Sleep Better section.


Until what time can you drink coffee without affecting your sleep?

The answer depends on your individual sensitivity to caffeine, which varies according to genetics, age, and habits. On average, the half-life of caffeine is 5 to 6 hours: a cup consumed at 4 PM still contains half of its caffeine at 9 PM-10 PM. For most sleepers, cutting off all sources of caffeine, coffee, tea, cola, energy drinks, and large amounts of chocolate after 2 PM-3 PM is a prudent rule. If you are particularly sensitive or if you go to bed before 10 PM, move this limit to 1 PM. If you sleep well and have no issues falling asleep, a coffee at 4 PM may not change anything for you, but if you are looking to improve your sleep, this is the first lever to test.

Does alcohol really help you fall asleep?

It does indeed speed up falling asleep: this is real and measured. But what alcohol gives on one side, it takes back on the other. It disrupts the structure of sleep by reducing REM sleep, the most important phase for mental recovery and memory consolidation. In practice, this translates to falling asleep quickly followed by a relatively heavy first half of the night, then a fragmented second half with frequent awakenings between 3 AM and 5 AM. The net result is poorer quality sleep than without alcohol, even if the total duration seems the same. Using alcohol as a sleeping aid is therefore counterproductive: it creates a dependency on a product that ultimately worsens insomnia rather than resolving it.

Are there specific foods to eat before sleeping to fall asleep better?

No magic recipe, but a few effective combinations. Tryptophan is the precursor amino acid for melatonin: it is found in turkey, chicken, eggs, dairy products, and nuts. For it to cross the blood-brain barrier and serve in the production of melatonin, it needs to be accompanied by carbohydrates with a moderate glycemic index (brown rice, whole grain bread, sweet potato). A dinner combining a light protein and a whole carbohydrate is therefore well-suited. If you feel a little hungry before sleeping, a banana (rich in tryptophan and potassium) or a handful of cashews are reasonable choices. Conversely, avoid a sweet snack alone: the glycemic spike that follows can cause waking in the middle of the night when blood sugar drops.

Does evening tea disrupt sleep like coffee?

It depends on the type of tea and your sensitivity. A black tea contains between 40 and 70 mg of caffeine per cup depending on the infusion time: less than an espresso (about 60-80 mg), but far from negligible. Green tea contains a little less but remains stimulating. Theanine present in tea has relaxing effects that partially mitigate caffeine, but this mitigation is partial, not total. For a sensitive sleeper, a black tea consumed at 7 PM may be enough to delay falling asleep by half an hour to an hour. If you enjoy a warm drink in the evening, opt for a caffeine-free herbal tea: verbena, chamomile, lemon balm, or valerian are well-suited options.

Does a late dinner prevent good sleep?

Yes, and for several reasons. Digestion is an active process that keeps the digestive system alert for two to four hours depending on the meal composition. Eating a hearty meal just before going to bed forces the body to manage two processes that are difficult to carry out simultaneously: digestion and inducing sleep. Meals rich in fats are particularly problematic, as they slow gastric emptying and increase the risk of reflux when lying down. Spicy foods can cause heartburn and disrupt the decrease in body temperature necessary for falling asleep. If your lifestyle does not allow you to have dinner two hours before sleeping, at least opt for a lighter meal in the evening, less fatty, less spicy, to mitigate the impact on your night.

Can a magnesium deficiency affect sleep?

Yes. Magnesium plays a role in regulating the nervous system and muscle relaxation, two mechanisms directly linked to sleep quality. A deficiency can manifest as difficulties in unwinding in the evening, nighttime cramps, and lighter sleep. The recommended intake for an adult is about 300 to 380 mg per day according to ANSES, and nutritional surveys show that a significant portion of the French population does not reach this threshold. The best dietary sources are leafy green vegetables (spinach, Swiss chard), nuts (almonds, cashews), legumes, whole grains, and dark chocolate. Supplementation may be considered in case of proven deficiency, after medical advice.