You’ve probably counted sheep at some point, maybe even cocooned yourself under a weighted blanket. Perhaps there’s a white-noise machine humming in your baby’s room right now. We try all kinds of tricks in search of a truly restful night’s sleep.
Sleeping well plays an important role in our overall health and well-being. It supports our brain function, physical repair, emotional balance, and for children and teens, it’s also important for growth and development.1
Solutions for a good night’s sleep are often looked for in the bedroom, but there is one powerful influence that we often tend to forget: food. Research suggests that what we eat may play a key role in how well we sleep. So, understanding the link between diet and sleep could help us to wake up feeling truly refreshed.
Sleep and our health
Sleep is essential for physical and mental recovery. Getting a good-quality rest at night is just as important as eating healthy food, drinking enough water and getting regular exercise. The recommended amount of sleep for an adult is 7 to 9 hours a night, which means you spend about one-third of your life sleeping!2
When we don’t sleep well, we can feel the effects ripple through nearly every part of our daily lives. From waking up in a bad mood and having low energy levels, to productivity and learning challenges. Sleep even influences our heart health and metabolism on a daily basis. A good night's sleep helps your brain build and protect the connections it needs to think clearly and stay alert.2
Did you know?
Chronic lack of sleep, or consistently poor-quality sleep, raises the risk of health issues such as high blood pressure, diabetes, heart disease, depression, and obesity.2
Let’s dive inside our brain, and learn more about the big part it plays in our sleep, from falling asleep to having a restful night.
The science of sleep
Sleep is a scientific process and it involves different parts of the brain all working together.
The hypothalamus
Deep inside your brain is a tiny part called the hypothalamus. It’s about the size of a peanut and helps control when you’re awake and when you’re sleepy. The hypothalamus gets information from your eyes about how much light there is. When it starts getting dark outside, your brain knows it’s time to get ready to go to bed.2
The brainstem
The hypothalamus works together with the brainstem. The brainstem helps you move from being awake to falling asleep. It releases a special chemical called GABA that helps calm your brain and body so you can rest. This is only one of the chemicals released in the brain. You’ve possibly heard of histamine, adrenaline, cortisol, or serotonin before. All of these help your brain balance between sleep and wakefulness.2
Did you know?
The brainstem also plays an important role during REM sleep. This is the sleep phase where most of our dreaming happens. During this stage, it sends signals to relax your muscles so you don’t move around or act out your dreams while sleeping. Lucky, no?2
The pineal gland and melatonin
When it starts getting dark, a tiny part of your brain called the pineal gland begins to make melatonin, a hormone that helps you feel sleepy. It’s sometimes called the ‘hormone of darkness’ because your body makes more of it when there’s less light. Melatonin works like your body’s internal day-night clock, helping you feel tired at night and awake during the day. This whole system is part of what is also called the circadian rhythm.3
Now, melatonin doesn’t just appear on its own. It needs certain building blocks.4 Let’s take a closer look:
How melatonin is made, a step-by-step process:4 5
- The process begins with the essential amino acid tryptophan, which is found in certain foods we eat, such as legumes, tofu, dairy, nuts, seeds and eggs.
- Tryptophan is converted to serotonin in a multi-step process that takes place mainly in the brainstem.6
- Serotonin reaches the pineal gland (a small part within the brain).
- Several enzymes convert serotonin to melatonin.
- Melatonin is released from the pineal gland into the bloodstream, with high levels being released at night, to make you feel sleepy.
Winter fatigue explained
Do you ever notice yourself feeling more tired during the colder and darker winter months? You’re not imagining it! When the days get shorter and there’s less sunlight, your body produces more melatonin, the hormone that makes you feel sleepy. That’s why the winter months often leave us wanting more rest.7
Nutrients that support healthy sleep
Good nutrition plays a key role in how well we fall asleep and stay asleep. We often overlook how strongly food shapes our nightly rest, yet certain vitamins, minerals, and amino acids we get from food help regulate brain activity, hormone production, muscle relaxation, and stress responses, all essential for quality rest. When these nutrients are lacking, our natural sleep–wake rhythm can easily become disrupted. Let’s explore the nutrients that matter most.8
Vitamin D
- Best known for its role in bone health, but also influences areas of the brain that control the sleep–wake cycle.
- The body produces vitamin D through sunlight exposure, with smaller amounts obtained from food and supplements.8
Which foods to eat? Foods like salmon, tuna, egg yolks, and mushrooms are naturally rich in vitamin D. In addition, many foods are fortified with it, including milk, yogurt, breakfast cereals, and orange juice.9
B Vitamins
- B vitamins may directly or indirectly affect sleep hormones.
- Deficiencies in B1 or B2 can cause fatigue and poor sleep quality.
- Vitamin B12 supports melatonin production and may influence sleep duration and consistency.
- Vitamin B6 may improve sleep quality and reduce symptoms of insomnia.8
Which foods to eat? You can get vitamin B1 from foods like peas, bananas, nuts, wholegrain breads, and some fortified cereals. Vitamin B2 can be found in milk, eggs, plain yoghurt, cheese, meat, leafy greens, and mushrooms. For vitamin B12, include foods such as meat, fish, eggs, dairy, plant milks, or meat substitutes. And vitamin B6 is present in poultry, peanuts, soy products, oats, and watermelon. These are just a few examples, there are plenty of other foods that provide these important nutrients too.10
Vitamin C
- Works as a strong protector for your body, helping to reduce stress inside your cells that can make it harder to sleep or make sleep problems worse.
- Adequate vitamin C levels support healthy brain and immune function, both of which also contribute to better rest.8
Which foods to eat? Foods such as oranges, grapefruit, kiwi fruits, tomatoes, strawberries, broccoli, cabbage, cauliflower and potatoes all contain good amounts of vitamin C.11
Key minerals
Just like vitamins, certain minerals may help your body relax and prepare for sleep. Two important ones are magnesium and zinc. Magnesium plays a big role in calming the body, while zinc also calms the mind. They support sleep hormones, help with reducing inflammation and help you rest better at night.12
Which foods to eat? Both zinc and magnesium can be found in foods like nuts and seeds, whole grains, and seafood. These are just a few examples, there are plenty of other options you can include to make sure you get enough of both!13 14
Key amino acids
Remember tryptophan? It’s an essential amino acid that plays a key role in producing serotonin and melatonin, both important for a good night’s sleep.4
Which foods to eat? Legumes (such as beans, peas, lentils, and chickpeas), tofu, dairy, nuts, seeds and eggs are all great sources of tryptophan.
Besides these key nutrients, there are plenty of other foods that can help you sleep better at night:
Omega-3 fats (found in salmon, walnuts, or chia seeds), fibre (like wholegrain pasta, brown rice, and beans), and complex carbohydrates (such as whole grains, potatoes, and fruits) all support restful sleep.
On the other hand, diets high in saturated fats (like butter, fatty meats, and cheese) or refined carbs (such as white rice or white pasta) can make it harder to get a good night’s rest.
For example, choosing wholegrain pasta with salmon and broccoli is a more sleep-friendly dinner than steak fried in butter with French fries. The first option not only has more nutrients overall, it can also help your body wind down more easily at night.
Remember: This content is for general information only. Seek the advice of your physician or health provider about any sleep problems.
The food–sleep connection
Heavy meals, especially those high in fat or carbs (like the example mentioned above) take longer to digest. This means your body is still working hard when you’re trying to rest, which can reduce sleep quality and make it harder to fall asleep. Research has shown that people who regularly have a high-calorie intake late at night tend to fall asleep more slowly and may wake up more often during the night.
For a long time, people believed that eating before bed could cause weight gain and disrupt sleep, but that isn’t necessarily true. Today, research shows us a more balanced picture: eating before bed isn’t automatically harmful. What really matters is how much you eat and the types of foods you choose.
A small snack before going to bed can even be helpful. It can keep your blood sugars steady, satisfy cravings or hunger, and in some cases help you fall asleep more comfortably.15
How long before bed should you stop eating?
Most experts suggest finishing your dinner 2 to 4 hours before bed. This gives your body time to digest properly and reduces the chances of acid reflux or sleep problems.
Snacks are a bit different. If you’re hungry, a small snack closer to bedtime is fine. The best timing can vary from person to person and depends on what snack you choose to have.
Meal planning can help you avoid cooking too late in the evening. When you don’t have to think about what to make or shop for every night, the mental load becomes lighter, and you might even end up cooking and eating a little earlier too.
Top tip: set aside a little time each week to plan your meals for the week ahead. Check out our article for easy tips to get started with weekly meal planning.
What to eat before bed
If you ate dinner early and want a light snack before bed, some foods can help you feel full, while at the same time supporting better sleep.4 15
- Walnuts and almonds contain high amounts of melatonin, while pistachios and cashews contain tryptophan.
- Dairy and milk are good sources of tryptophan and melatonin. So that cup of warm milk your granny was talking about, actually makes sense. But you can swap for low-fat yoghurt too.
- Chamomile tea: may interact with brain receptors that help you relax.
- Eat cherries an hour or two before bedtime. This fruit may improve sleep length and quality as it contains melatonin.
What to avoid before bed
- Spicy and acidic foods can trigger heartburn, especially when lying down.
- Foods high in fats, such as fried foods, full-fat dairy products and fatty meats, as they take a long time to digest.
- Caffeine-containing foods and drinks , such as coffee, chocolate, and tea. Caffeine can stay in your system for several hours after consumption. Even some desserts, like tiramisu or chocolate mousse, can add caffeine to your late-night snack.
- Alcohol: even if it makes you drowsy at first, alcohol disrupts deep sleep. This leads to lighter and less restorative rest and more probability of wakefulness in the second half of the night.4 15 16
More than food: daily habits that support better sleep
We’ve been focusing on food and key nutrients that can support a good night’s sleep. But healthy sleep comes from more than eating well and going to bed on time. Drinking enough water, moving your body, and taking care of your daily habits all help you sleep well.
Staying hydrated is important, as your body is mostly water, and not drinking enough can cause dry mouth, headaches, or muscle cramps at night.
Exercising or moving your body during the day, also helps your body rest at night. This doesn’t mean you need to get a gym pass any time soon. Regular movement such as cycling to the supermarket, walking and avoiding the car when possible, working in the garden and dancing to your favourite music, can all help you fall asleep faster, sleep longer, and even prevent sleep problems like insomnia.
Other lifestyle choices also affect your sleep. We’ve all heard that screens like phones, tablets, and computers give off blue light that tricks your brain into feeling awake. It’s not easy, but it’s best to avoid them right before bed. Install a calming evening routine to signal to your body that it’s time for rest. Simple relaxation techniques, like slow breathing or stretching, can help calm your body and mind.
And besides that, stress, school or family responsibilities all have a role to play in how we sleep at night.17 18
Step-by-step towards better sleep
If you’re struggling with sleep and want to improve it, start small. Habits tend to stick when they feel easy and realistic for the long run.
If you usually eat dinner late, try having a lighter meal once or twice a week, or see if you can shift your meal just 30 minutes earlier. If you enjoy watching TV at night, choose one “book night” each week to give your mind a calmer wind-down. And if you like a bedtime snack, try some of the sleep-friendly options above and notice which ones work well for you.
It’s not about doing everything perfectly, it’s about finding the tips that fit your life right now and feel doable. Sleep well!
Most viewed
Eating more plants this January: how small changes can support your health and the planet
Start the year strong and eat plants effortlessly by making smart swaps. Embrace the full spectrum of plants, including herbs, spices, tea and coffee.
How truffles are grown: the secrets behind truffle foraging and farming
Why are truffles rare and expensive?
References
- Sejbuk et al. 2022; Meng et al, 2017.
- Arendt, J., & Aulinas, A. (2022, October 30). Physiology of the pineal gland and melatonin. Endotext - NCBI Bookshelf.
- Gibson, E. L. (2018). Tryptophan supplementation and serotonin function: genetic variations in behavioural effects. Proceedings of the Nutrition Society, 77(2), 174–188.
- Professional, C. C. M. (2025, May 2). Melatonin. Cleveland Clinic.
- Pacheco, D. (2025, July 15). Sleep vitamins. Sleep Foundation.
- Otis, B. O. (2024, October 24). Vitamin D • The Nutrition Source. The Nutrition Source - Harvard Chan School.
- Healthdirect Australia. (2025, July 16). Vitamin B and your health. Foods High in Vitamin B | Healthdirect.
- Healthdirect Australia. (n.d.). Vitamin C and your health. Foods High in Vitamin C | Healthdirect.
- Esquivel, M. K., & Ghosn, B. (2024). Current evidence on common dietary supplements for sleep quality. American Journal of Lifestyle Medicine, 18(3), 323–327.
- Healthdirect Australia. (n.d.-a). Foods high in magnesium. Healthdirect.
- Healthdirect Australia. (n.d.-b). Foods high in zinc. Healthdirect.
- Fountain, L. (2025, July 16). Is eating before bed bad? Sleep Foundation.
- Bryan, L. (2025, October 23). Alcohol and sleep. Sleep Foundation.
- Korkutata, A., Korkutata, M., & Lazarus, M. (2025). The impact of exercise on sleep and sleep disorders. Npj Biological Timing and Sleep, 2(1).
- Groth, L. (2024, June 6). Can drinking water (or not drinking enough) affect your sleep? EverydayHealth.com.