A new study published in Nature Communications found that drinking coffee, whether caffeinated or decaf, may reshape gut bacteria and affect mood, stress levels, memory and learning ability.
Caffeinated coffee was linked to reduced anxiety and improved alertness, while decaf was associated with better memory and sleep quality. Participants were taken off coffee for two weeks, and the results after they resumed drinking it surprised researchers.
5 View gallery


Both caffeinated and decaf coffee affected gut bacteria, mood and brain function
(Photo: Shutterstock)
Researchers found clear differences between caffeinated and decaf coffee. Caffeinated coffee was linked to reduced anxiety, improved attention and better stress coping, while decaf was associated with stronger memory and learning performance, better sleep quality and increased physical activity.
The study was conducted by researchers from University College Cork in Ireland and APC Microbiome Ireland. It was the first to take an in-depth look at coffee’s effect on the “gut-brain axis, the bidirectional communication pathway between the gut microbiome and the brain."
The study included 62 healthy adults in Ireland, ages 30 to 50. Half did not drink coffee at all, while the other half were regular coffee drinkers who consumed three to five cups a day.
Participants underwent a broad series of tests, including assessments of memory, attention and learning; questionnaires on anxiety, depression, stress and sleep; and blood, saliva, urine and stool tests. Researchers also conducted advanced genetic sequencing of gut bacteria, along with metabolite testing, which measures substances produced during metabolic processes in the body and digestive system.
After the baseline tests, the coffee drinkers were asked to stop consuming coffee, caffeinated drinks and dark chocolate entirely for two weeks. Participants were then randomly divided into two groups: one received regular caffeinated coffee, and the other received decaf, for another three weeks. The trial was double-blind, meaning the participants did not know which type of coffee they were drinking.
Prof. Nathan Gluck, a gastroenterologist at Assuta Medical Centers, said one of the study’s main strengths was its methodology. “The researchers did not simply compare people who drink coffee with people who do not,” he said. “They also examined what happens when coffee consumption stops and then resumes. That strengthens the possibility of a direct link between coffee drinking and the changes observed in gut bacteria and other measures tested.”
Dr. Sandra Benizri, a neurologist at Assuta Ramat HaHayal, said that while the study was relatively small, the microbiome findings were particularly striking. “The researchers saw clear and consistent changes in gut bacteria both during coffee consumption and after it was removed and reintroduced,” she said. “That’s a meaningful finding, particularly with growing research into the relationship between the gut and the brain.”
‘Gut bacteria affect the brain’
Researchers found that coffee drinkers had a markedly different gut bacteria profile compared with non-drinkers. Coffee drinkers had higher levels of certain bacteria, including “Cryptobacterium curtum” and “Eggerthella,” which researchers said are linked to bile acid production and various digestive processes.
Coffee drinkers also showed significant changes in various metabolites in the gut and urine, including substances related to the breakdown of caffeine and polyphenols, plant compounds found in coffee. Researchers also found changes in certain neuroactive substances, such as GABA and IPA, which affect the nervous system, anxiety and cognitive function.
The findings add to a growing body of research in recent years examining the link between gut bacteria and the brain. “Today, we already know there is a connection between the gut microbiome and brain function and neurological diseases,” Benizri said. “For example, characteristic gut bacteria patterns have been identified in Parkinson’s disease.”
Still, she stressed that “it is not yet clear how much we can alter this bacterial population to prevent or treat disease.”
5 View gallery


Gut bacteria produce substances that can travel through the bloodstream and affect brain activity and the body’s stress response
(Illustration: Shutterstock)
Gluck said gut bacteria produce metabolic substances that can reach the brain through the bloodstream. “If the composition of the bacteria changes, the substances they produce also change,” he said. “The researchers believe changes in metabolites such as GABA may be linked to effects on anxiety, stress and brain function.”
Changes were also found in the immune system. Coffee drinkers had lower levels of CRP, a key inflammation marker, along with higher levels of IL-10, a molecule with anti-inflammatory activity. When participants stopped drinking coffee for two weeks, inflammation markers rose.
Gluck said the researchers found fewer inflammation markers in the blood of participants who drank coffee, a finding that may suggest various components in coffee have an anti-inflammatory effect.
“When participants stopped drinking coffee, the inflammatory markers rose again,” he said. “This does not definitively prove causation, but it certainly strengthens the possibility of a direct link between coffee consumption and its effect on the immune system and the body’s inflammatory response.”
5 View gallery


The 'gut-brain axis' is the communication system between gut bacteria, the immune system and the brain, an area of research that has drawn growing interest in recent years
(Illustration: Shutterstock)
According to the findings, these effects fit with previous studies that have linked coffee consumption to a reduced risk of heart disease, diabetes, Parkinson’s disease and depression.
Caffeine is not the only factor
The researchers said the findings may indicate that coffee’s effect on the brain is not related only to caffeine, but also to other compounds in the drink, including polyphenols and phenolic acids.
“Coffee contains a wide range of active substances beyond caffeine, and some may affect both gut bacteria and brain activity,” Benizri said. “Various studies have already suggested that coffee may have a beneficial effect on brain health.”
Gluck also emphasized that coffee is far more complex than caffeine alone. “Even decaf coffee retains active compounds that come from the coffee beans,” he said. According to Gluck, researchers found that resuming coffee consumption, whether caffeinated or decaf, was linked to lower stress levels, fewer low-mood symptoms and reduced impulsivity. The reductions in anxiety and emotional distress, however, were seen only among participants who drank caffeinated coffee.
5 View gallery


Coffee contains many active compounds beyond caffeine, including polyphenols and phenolic acids, which may affect the brain and the gut
(Photo: Sutterstock)
Benizri said the link between coffee and stress is more complex than commonly thought. “When people consume more coffee than usual, there can be an increase in cortisol, known as the stress hormone,” she said. “However, among people who regularly drink coffee, we usually no longer see a significant stress response in terms of cortisol levels.”
She said the current study found more impulsivity and emotional reactivity among people who consumed more coffee, while people who did not drink coffee showed greater stability in cognitive function.
Researchers said the findings could one day help predict how a person will respond to coffee based on their gut bacteria, and possibly guide personalized dietary recommendations.
Who should be cautious with coffee?
Gluck also addressed coffee’s known effect on the digestive system. “Coffee mainly increases gut activity and intestinal movement,” he said. “That may be one of the ways it affects gut bacteria, though the study did not directly measure how quickly food moved through the intestine.”
Still, he said, the researchers tried to address the issue indirectly by assessing stool characteristics using standard measures of intestinal motility. “They did not actually measure how long after drinking coffee bowel activity occurred,” he said. People with irritable bowel syndrome, diarrhea or reflux, meaning heartburn, may be more sensitive to coffee’s effects on the digestive system, he said.
5 View gallery


In some people, suddenly stopping coffee may cause headaches and migraines as part of withdrawal symptoms
(Photo: Shutterstock)
Benizri also said certain groups should be more cautious about drinking coffee. “With migraines, for example, the issue often isn’t coffee itself, but quitting it abruptly,” she said. “People who regularly drink coffee and suddenly stop may develop headaches or migraines as part of withdrawal.”
During a migraine attack, she said, coffee may actually provide relief, and some migraine medications contain caffeine. “However, in some people, coffee can also worsen headaches over time,” she added.
Benizri also noted that people whose heart rate or blood pressure rises after drinking coffee should be cautious and consult a doctor. “For most people whose blood pressure is controlled with medication, there is no need to avoid coffee, but it is important to keep consumption relatively stable and consistent,” she said.
As for sleep, Benizri concluded: “People who suffer from insomnia should avoid coffee, tea or other caffeinated drinks late in the day. Sleep is essential for brain health and proper brain function.”


