When we lie awake at night, unable to sleep, we usually blame stress, depression, anxiety, adrenaline or the memory of something stupid we said in 2003. But what if our guts were actually the culprit? What if the trillions of microbes sitting in our small intestines – known collectively as the microbiome or microbiota – were actually affecting our mood, digestion, overall health and ability to get a full eight hours’ shut-eye? Scientists are beginning to suspect there is a strong, if as yet unproven, link between gut health – the diversity and wellbeing of bacteria in the stomach, small and large intestines – and sleep health.

“This is an embryonic field right now in the annals of sleep research,” says Matt Walker, the author of Why We Sleep and the director of the Center for Human Sleep Science at the University of California, Berkeley. “We know an enormous amount about the relationship between a lack of sleep and appetite, obesity and weight gain, as well as aspects of insulin resistance and glucose regulation. What we don’t fully understand yet is the role of the microbiome in sleep.”

We know that sleep deprivation increases our chances of obesity and affects the way we control food intake. Lack of sleep results in a decrease in leptin, the hormone that makes us feel full, and a surge in ghrelin, which stops us feeling satisfied with the food we do eat. That means we keep eating – sometimes as much as an extra 300 calories a day. Lack of sleep also affects the parts of our brain responsible for impulse control, leaving us with very little chance of eating healthily and taking care of that gut ecosystem. Poor sleep, then, can certainly affect our gut. The question is, could our gut affect our sleep?

“Is improving gut health a possible new sleep therapy? That is one of our least understood but most exciting possibilities,” says Walker.

Dr Michael Breus, a clinical psychologist and fellow of the American Academy of Sleep Medicine, agrees that this is a possibility worth pursuing. “There is no question in my mind that gut health is linked to sleep health, although we do not have the studies to prove it yet. Scientists investigating the relationship between sleep and the microbiome are finding that the microbial ecosystem may affect sleep and sleep-related physiological functions in a number of different ways: shifting circadian rhythms, altering the body’s sleep-wake cycle, affecting hormones that regulate sleep and wakefulness. ”

While we wait for the definitive science, Breus suggests taking probiotics (a type of live bacteria) and prebiotics (non-digestible carbohydrates, mainly fibre) to feed the good bacteria in our guts. The benefits of probiotics for the gut are well documented. A recent study from scientists at the University of Colorado, published in Frontiers of Behavioural Neuroscience, suggests that prebiotics could have a significant effect on the quality of non-REM and REM sleep. This is something insomniac Dr Michael Mosley tested out with some success in a recent BBC documentary – he took prebiotics for five days and saw improvement in his sleep. The day before the experiment, Mosley spent 21% of his time in bed awake; by the final day, that was down to 8%. This is, of course, anecdotal – but nevertheless interesting.

Eating berries, along with nuts, 70% dark chocolate, seeds and decaffeinated coffee could help improve gut health, and as a result, your sleep. Photograph: Alamy Stock Photo

Tim Spector, professor of genetic epidemiology at King’s College London and the author of The Diet Myth, agrees that a healthy gut could promote good sleep. Like Walker and Breus, he also believes gut health is linked to our moods. That is particularly interesting for someone like me, who suffers from both depression and insomnia. I live with bipolar disorder; my moods affect my sleep, and, traditionally, I would expect my brain to be in charge of that. But it turns out it is not that simple.

“We know that people who live with depression and people who sleep poorly both have abnormal microbes in the gut, which would suggest there is a very real connection here between all three,” says Spector. “I’ve always found that if you help someone sleep, it improves their depression, and vice versa. If we can also look after the gut, this may have an impact on both sleep disturbances and mood disorders.” It has long been known that there is a reciprocal relationship between depression and sleep, in that most depressed people sleep poorly and many insomniacs develop depressive symptoms.

Spector is convinced that you can improve sleep disturbance with diet. “That was dismissed until recently by psychiatrists and sleep therapists, but if we eat badly, we sleep badly,” he says. “If you wanted to improve sleep, you could try a gut-friendly regime by eating a broad and inclusive diet with real food, not processed. Everyone is going to be different. You could try being vegetarian for a month and see if it helps. Double your fibre intake and eat fermented foods every day, such as full-fat yoghurt and good-quality cheeses. Increase the range of foods in your diet. Eat berries, green tea, 70% dark chocolate, decaffeinated coffee, nuts and seeds. Don’t eat just before you go to bed, but equally, don’t go hungry. Avoid snacking before bedtime. I don’t want to be too prescriptive but really, if you want richer microbes, you’ll eat more of a range of foods and that will induce chemicals that will calm you.”

As for the bedtime routine, Christine Hansen, author of Sleep Like a Boss, has some further tips. “My general advice is to eat low-glycaemic index foods before bed because they’ll release the energy more slowly. If you do eat high-GI foods, like a dessert or sugar or something refined, pair it with some protein or fibre. For example, if you have white bread, have it with cream cheese and banana or eggs. If you want crackers, go for wholegrain. You probably don’t want to eat food before bed that’s difficult to digest – fried food or heavy meats, for example. Go for fish or chicken rather than sitting down for a big steak, and try to indulge at lunchtime rather than dinner to give yourself the best chance at sleep.”