The Gut-Brain Connection: How Food Affects Your Mood
You have probably noticed that some meals leave you feeling energised and clear-headed, while others leave you sluggish or irritable. That is not just in your head — or rather, it is, but via a surprisingly direct route. The emerging science of the gut-brain axis is revealing just how deeply your diet shapes your mood, your mental clarity, and your overall sense of wellbeing.
The Gut-Brain Axis Explained
Your gut and brain are in constant conversation. This two-way communication system — known as the gut-brain axis — uses neural, hormonal, and immune pathways to keep both organs informed about what is happening in the other.
The vagus nerve: your body’s information superhighway
The vagus nerve is the longest cranial nerve in your body, running from your brainstem all the way down to your gut. It carries signals in both directions — roughly 80% of the traffic flows upward from gut to brain, not the other way around. This means your gut is constantly sending your brain updates about what you have eaten, the state of your microbiome, and how your digestive system is functioning.
Your gut produces neurotransmitters
This is the part that surprises most people. Your gut does not just digest food — it is a major production site for the same chemical messengers your brain uses to regulate mood. Around 95% of your body’s serotonin is produced in the gut, along with approximately 50% of your dopamine. Your gut bacteria also produce GABA (gamma-aminobutyric acid), a neurotransmitter that helps regulate anxiety and calm the nervous system.
The microbiome: trillions of tiny influencers
Your gut is home to trillions of bacteria, fungi, and other microorganisms — collectively known as the gut microbiome. These microbes are not passive passengers. They break down fibre into short-chain fatty acids (like butyrate) that reduce inflammation and support the gut lining. They produce vitamins, regulate immune function, and directly influence neurotransmitter production. Research from King’s College London has shown that greater microbiome diversity is associated with better mental health outcomes.
When the microbiome is disrupted — through poor diet, stress, illness, or antibiotic use — it can affect this entire communication system. The scientific term for this is dysbiosis, and it has been linked to increased anxiety, low mood, and brain fog.
Foods That Support Gut-Brain Health
Supporting your gut-brain axis does not require exotic supplements or complicated protocols. It starts with what you put on your plate every day.
| Food Group | Examples | How It Helps |
|---|---|---|
| Fermented foods | Live yoghurt, kefir, sauerkraut, kimchi, miso | Introduce beneficial bacteria (probiotics) directly into the gut, increasing microbiome diversity |
| Prebiotic foods | Garlic, onions, leeks, asparagus, bananas, oats | Feed existing gut bacteria, helping beneficial strains thrive and produce short-chain fatty acids |
| Omega-3 rich fish | Salmon, mackerel, sardines, herring | Reduce neuroinflammation, support brain cell membrane integrity, and may enhance gut bacteria diversity |
| Whole grains | Oats, brown rice, wholemeal bread, barley | Provide fibre that gut bacteria ferment into butyrate, which supports the gut lining and reduces inflammation |
| Diverse fruits & vegetables | Aim for 30 different plant foods per week | Each plant contains different types of fibre and polyphenols, feeding different bacterial species and promoting diversity |
| Polyphenol-rich foods | Berries, dark chocolate, green tea, extra virgin olive oil | Act as antioxidants and are metabolised by gut bacteria into beneficial compounds that support brain health |
The 30-a-week rule
Research from the American Gut Project (with significant contributions from King’s College London) found that people who ate 30 or more different plant foods per week had significantly more diverse gut microbiomes than those who ate fewer than 10. Diversity is key — it is not just about eating more vegetables, but eating a wider variety. Herbs, spices, nuts, seeds, and legumes all count.
Foods That May Negatively Affect Mood
Just as some foods support the gut-brain axis, others can disrupt it. This is not about labelling foods as “good” or “bad” — it is about understanding the mechanisms so you can make informed choices.
Ultra-processed foods
A growing body of evidence links high consumption of ultra-processed foods (UPFs) to increased risk of depression and anxiety. UPFs tend to be low in fibre and high in emulsifiers and artificial additives, which may negatively affect the gut microbiome. A 2022 study in BMJ found that higher UPF consumption was associated with a 44% increased risk of depression. For more detail, see our guide on what counts as ultra-processed food in the UK.
Excess sugar
Diets high in refined sugar can feed less beneficial gut bacteria at the expense of more helpful strains. Sugar also triggers rapid blood glucose spikes and crashes, which can affect mood, energy, and concentration. This does not mean all sugar is harmful — the sugar in whole fruit comes packaged with fibre, vitamins, and polyphenols that support gut health.
Artificial sweeteners
Research on the gut microbiome effects of artificial sweeteners is still evolving. Some studies (including a 2022 Cell paper) have suggested that sweeteners like saccharin and sucralose can alter gut bacteria composition in some individuals. The evidence is not yet conclusive, and UK regulatory bodies consider approved sweeteners safe at permitted levels, but it is an active area of research.
Excess alcohol
Alcohol can increase gut permeability (sometimes called “leaky gut”), allowing bacterial toxins to enter the bloodstream and trigger inflammation. It also disrupts the balance of gut bacteria. The NHS recommends no more than 14 units per week, spread over several days.
Track What You Eat and How You Feel
Understanding the gut-brain connection is useful in theory, but the real value comes from understanding your own gut-brain connection. Everyone’s microbiome is different, and the same food can affect two people in very different ways.
This is where food-mood tracking becomes genuinely powerful. By logging what you eat alongside how you feel — your energy levels, mood, digestive comfort, mental clarity — you build a personal dataset over time. Patterns that would be invisible day-to-day become clear over weeks.
NutraSafe’s food diary and reaction tracking feature is designed for exactly this. Log your meals, note your symptoms or mood, and let the app help you identify correlations. Maybe dairy consistently leaves you feeling foggy. Maybe your mood lifts on days you eat more fermented foods. Maybe you sleep better when you have oily fish for dinner. These are insights no general advice article can give you — they are personal to your body and your microbiome.
If you do identify patterns, that data is also invaluable if you decide to speak with a GP or registered dietitian. “I think certain foods affect my mood” is a starting point. “Here are three months of food and mood data showing a consistent pattern” is a conversation changer.
The Mediterranean Diet and Mental Health
If there is one dietary pattern that the research consistently supports for both gut health and mental wellbeing, it is the Mediterranean diet — or a UK-adapted version of it.
The SMILES Trial
The landmark SMILES trial (Supporting the Modification of Lifestyle in Lowered Emotional States), published in BMC Medicine in 2017, was the first randomised controlled trial to test whether dietary improvement could treat clinical depression. Participants with moderate-to-severe depression who followed a modified Mediterranean diet for 12 weeks showed significantly greater improvement in depressive symptoms than a social support control group. Around a third of the diet group achieved remission, compared to 8% in the control group.
The PREDIMED study
The large-scale PREDIMED study (Prevención con Dieta Mediterránea), involving over 7,000 participants, found that a Mediterranean diet supplemented with extra virgin olive oil or mixed nuts was associated with a lower risk of depression, particularly among those with type 2 diabetes.
Adapting it for UK foods
You do not need to import everything from the Mediterranean to follow this pattern. The principles translate well to UK-available foods:
- Oily fish — Salmon, mackerel, sardines (aim for two portions per week, as the NHS recommends)
- Plenty of vegetables — Whatever is seasonal and affordable. Frozen vegetables are just as nutritious as fresh
- Whole grains — Oats, wholemeal bread, brown rice, barley
- Legumes — Lentils, chickpeas, beans (tinned is fine and budget-friendly)
- Nuts and seeds — A small handful daily. Walnuts are particularly rich in omega-3
- Olive oil — Use as your main cooking oil where possible
- Fermented foods — Live yoghurt or kefir daily, sauerkraut or kimchi a few times per week
- Herbs and spices — These count towards your plant diversity and many have anti-inflammatory properties
The key is the overall pattern, not individual superfoods. Consistency and diversity matter more than perfection.
Important
Dietary changes can support mental wellbeing, but they are not a replacement for professional mental health support. If you are struggling with your mental health, please speak to your GP. You can also contact the Samaritans at any time on 116 123 (free, 24/7) or email jo@samaritans.org. You deserve support, and asking for it is a sign of strength.
Start Your Food-Mood Diary
Track what you eat and how you feel. Spot patterns. Understand your body. NutraSafe makes it simple.
Download NutraSafe FreeFrequently Asked Questions
What is the gut-brain connection?
The gut-brain connection (also called the gut-brain axis) is the two-way communication system between your digestive tract and your brain. Your gut contains around 500 million neurons connected to the brain via the vagus nerve. The gut also produces approximately 95% of the body’s serotonin, a neurotransmitter that plays a key role in regulating mood, sleep, and appetite. The trillions of bacteria in your gut microbiome influence this communication by producing neurotransmitters, short-chain fatty acids, and immune signalling molecules.
Can changing your diet improve your mental health?
Research suggests that dietary changes can support mental wellbeing. The SMILES trial (2017), published in BMC Medicine, found that participants with moderate-to-severe depression who followed a modified Mediterranean diet for 12 weeks showed significantly greater improvement in depressive symptoms compared to a social support control group. However, diet is one factor among many, and dietary changes should complement — not replace — professional mental health support.
What foods are good for gut-brain health?
Foods that support the gut-brain axis include fermented foods (live yoghurt, kefir, sauerkraut, kimchi) which introduce beneficial bacteria; prebiotic foods (garlic, onions, leeks, asparagus, bananas) which feed existing gut bacteria; omega-3 rich fish (salmon, mackerel, sardines) which support brain function and reduce inflammation; whole grains which provide fibre for gut bacteria; and a diverse range of fruits and vegetables — research from King’s College London suggests aiming for 30 different plant foods per week for optimal microbiome diversity.
How long does it take for diet changes to affect your mood?
The gut microbiome can begin to shift within days of dietary changes, but meaningful, sustained effects on mood and mental wellbeing typically take several weeks. The SMILES trial measured outcomes at 12 weeks. Many researchers suggest allowing at least 4 to 6 weeks of consistent dietary changes before expecting to notice differences in how you feel. Keeping a food and mood diary during this period can help you identify patterns that might otherwise go unnoticed.
Can I track how food affects my mood?
Yes. NutraSafe’s food diary lets you log what you eat alongside symptoms and reactions, including how you feel after meals. Over time, this builds a personal picture of how your diet relates to your mood, energy, and wellbeing. You can spot patterns — for example, whether certain foods consistently leave you feeling sluggish or anxious — and share this data with a GP or dietitian if needed.
Related Reading
Last updated: February 2026. Sources: NHS, British Nutrition Foundation, BMJ (SMILES Trial), King’s College London.