Brain Fog and Food: What Actually Causes It, and What to Check First
It is 3pm. You have read the same email three times and still could not say what it asks for. A colleague says something and the word you want is just out of reach. You had a sandwich and a coffee at lunch, so naturally the question forms: was it the bread? The milk? Something you ate?
Here is the plain answer. Brain fog is a symptom, not a diagnosis, and food is only one of several things that can cause it. Poor sleep, mild dehydration, a large refined-carbohydrate meal, low iron, low vitamin B12, an untreated thyroid problem, undiagnosed coeliac disease, alcohol, some medicines, long COVID, and low mood or anxiety can all produce the same fuzzy, slow, cannot-quite-focus feeling. Several overlap with what you eat, which is why food gets the blame. Most are checkable, and the non-food ones are often fixed fastest.
The mistake is to go straight to cutting things out. A better order is: fix the cheap things, test the common things, and only then run a short, structured food trial if the fog is still there.
What "brain fog" actually is
"Brain fog" is not a medical term. People who use it describe slowed thinking, trouble concentrating, poor short-term memory and difficulty finding words. Those are real, measurable changes in attention and processing speed, and they show up in the conditions below. The label is vague because the causes are many, not because the experience is imaginary. A symptom with ten possible causes is not solved by removing one food and hoping.
The causes with the best evidence, in rough order of how often they turn up
Sleep
Sleep is the biggest lever and the least glamorous. A meta-analysis of 70 studies and 147 cognitive tests found that short-term sleep loss has its largest effects on simple sustained attention and on speed, with memory in between and reasoning accuracy least affected (Lim and Dinges, Psychological Bulletin, 2010). Lapses of attention and slower thinking are, word for word, what people call brain fog.
In real life: if you have slept badly for a week, no diet will out-run it. Fix or at least record the sleep, so you do not blame lunch for what the night did.
Mild dehydration
You do not have to be visibly thirsty for hydration to affect how you think. In placebo-controlled trials, dehydration of about 1.4 percent of body weight in young women, roughly a hot afternoon without drinking enough, produced lower concentration, more perceived task difficulty, headache and fatigue (Armstrong et al., Journal of Nutrition, 2012). A matching study in young men found impairments in vigilance and working memory, with more tension, fatigue and anxiety at a similar level of dehydration (Ganio et al., British Journal of Nutrition, 2011).
The caveat: these were exercise-induced dehydration studies in young adults and the effects were modest. But the fix costs nothing.
Blood sugar swings after a big refined-carbohydrate meal
The afternoon slump after a large plate of white rice, pasta or a pastry-heavy lunch is real, and it is not the "sugar rush" we were taught. A meta-analysis of 31 studies with 1,259 participants found no positive effect of carbohydrate on any aspect of mood at any time point, and instead found more fatigue and less alertness within the first hour after eating carbohydrate compared with placebo (Mantantzis et al., Neuroscience and Biobehavioral Reviews, 2019).
The effect sizes are small, so this is "research suggests" rather than "evidence shows". In practice, a lunch built on protein, fibre and some fat, with the carbohydrate as a side rather than the base, flattens the swing for most people. If your fog is precisely this shape (fine in the morning, gone by mid-afternoon after a big lunch), start with tired after eating: why you get low energy after meals.
Low iron
Iron carries oxygen and is used by the brain directly. In a blinded, placebo-controlled trial of young women of varied iron status, women with iron-deficiency anaemia performed worse and more slowly on cognitive tasks than iron-sufficient women, and 16 weeks of iron treatment improved attention, memory and learning in those who had been deficient (Murray-Kolb and Beard, American Journal of Clinical Nutrition, 2007).
Iron deficiency is common in women who menstruate, in people who eat little or no meat, and in anyone with a gut condition. A ferritin test is cheap. If it comes back low, iron from food vs supplements covers what to eat, what blocks absorption and how to take a supplement if you are prescribed one.
Low vitamin B12
B12 is needed for nerve function, and deficiency causes problems with thinking, memory and behaviour, some of which can be irreversible if untreated (NHS, vitamin B12 or folate deficiency anaemia). Three groups are at particular risk, and two of them have nothing to do with diet:
- Vegans and many vegetarians, because B12 comes almost entirely from animal foods or fortified products. This is a supplementation question, not a willpower question.
- People taking metformin. In a randomised placebo-controlled trial over 4.3 years, metformin lowered B12 by 19 percent on average, and the absolute risk of deficiency was 7.2 percentage points higher than placebo, roughly one extra case for every 14 people treated (de Jager et al., BMJ, 2010).
- People on long-term acid suppressants. In a large case-control study, two or more years of proton pump inhibitor use was associated with a 65 percent higher risk of B12 deficiency, with a dose-response relationship (Lam et al., JAMA, 2013).
If you are in any of these groups and foggy, ask for a B12 test before you change your diet. Do not stop metformin or a prescribed acid suppressant on your own; the fix is usually a B12 supplement alongside, agreed with the prescriber.
Undiagnosed coeliac disease
This is the one food-related cause where "brain fog" has been studied by name. In a longitudinal pilot study, 11 adults with newly diagnosed coeliac disease were tested at diagnosis and again after 12 and 52 weeks on a gluten-free diet. Four of the cognitive tests, covering verbal fluency, attention and motor function, improved significantly over the year, and the improvement tracked the healing of the gut lining and the fall in coeliac antibodies (Lichtwark et al., Alimentary Pharmacology and Therapeutics, 2014).
Two honest caveats. It was 11 people with no control group, so the evidence is limited rather than established. And it applies to coeliac disease, an autoimmune condition confirmed by blood test and usually biopsy, not to gluten in general. The practical consequence: the coeliac blood test only works while you are still eating gluten, so get tested first and go gluten-free second. If you are already diagnosed, hidden sources of gluten in restaurant menus covers the eating-out side.
Untreated thyroid problems
An underactive thyroid slows everything, including thinking. NHS symptom lists include tiredness, lack of concentration, poor memory, feeling cold and weight gain, and note that symptoms develop slowly, so people often do not realise for years (NHS, underactive thyroid). It affects around 2 percent of the UK population and more than 5 percent of people over 60, with women five to ten times more likely to be affected than men (NICE guideline NG145, 2019). It is found with a blood test and treated with a tablet.
Alcohol
A systematic review and meta-analysis of 19 studies found that the day after heavy drinking, once blood alcohol is back to essentially zero, short-term memory, long-term memory, sustained attention and psychomotor speed were all impaired (Gunn et al., Addiction, 2018). If your foggiest days follow social evenings, the wine is a stronger suspect than the pasta.
Medicines
Many common medicines dull attention, particularly those with anticholinergic effects: some antihistamines, bladder medicines, older antidepressants and sleep aids. In a large English primary-care study, higher cumulative anticholinergic exposure over 1 to 11 years was associated with a higher risk of dementia diagnosis (Coupland et al., JAMA Internal Medicine, 2019). That is an association, not proof, and it concerns years of use rather than a single tablet, but it is a good reason to have a pharmacist review your list if fog started after a new prescription. Do not stop anything on your own.
Long COVID
Cognitive dysfunction is one of the three most common symptoms in the WHO's clinical definition of post-COVID-19 condition, alongside fatigue and breathlessness, typically starting within three months of infection and lasting at least two months (Soriano et al., Lancet Infectious Diseases, 2022). If your fog began after an infection, tell your clinician that timing.
Depression and anxiety
A meta-analysis found moderate deficits in executive function, memory and attention in people with depression compared with controls, and some of those deficits persisted after mood had recovered (Rock et al., Psychological Medicine, 2014). Anxiety competes for the same attention. If the fog arrived with flat mood, worry, or loss of interest, that is worth saying out loud to someone, and depression and food looks at what diet can and cannot do there.
What we know, what is uncertain
What we know: sleep loss, alcohol, iron deficiency, B12 deficiency and untreated hypothyroidism measurably impair attention and memory, and treating them helps. Mild dehydration and large carbohydrate loads have smaller, shorter effects that are still worth removing.
What is uncertain: whether specific foods cause brain fog in people without coeliac disease, allergy or a diagnosed intolerance. The coeliac evidence is promising but small. Evidence for "gluten brain fog" without coeliac disease is weak, and much of it is confounded by placebo and nocebo effects, which are strong for cognitive symptoms. The link between ketogenic diets and mental clarity is mostly anecdotal at this point; we look at it in keto diet and mental health.
What about food sensitivity tests? The IgG and IgG4 "food intolerance" panels sold online and in some clinics have not been validated. The European Academy of Allergy and Clinical Immunology's task force concluded that IgG4 to foods indicates a normal immune response to exposure, not allergy or intolerance, and does not recommend the tests as a diagnostic tool (Stapel et al., Allergy, 2008). In plain terms: a positive result mostly tells you what you eat often. Acting on it means cutting out foods you tolerate and possibly missing the real cause.
A plan you can start this week
- Track for seven days before changing anything. Sleep hours, drinks, alcohol, main meals, and a 1 to 5 fog score mid-morning and mid-afternoon.
- Protect sleep first. Same wake time daily, seven hours or more. If the fog lifts, you have your answer without touching your diet.
- Drink through the day, not just at meals. Water or tea on the desk; pale urine is a good enough guide.
- Rebuild lunch around protein and fibre. Eggs, fish, chicken, tofu, lentils or beans, with vegetables and a modest portion of carbohydrate.
- Ask your GP for four tests: full blood count and ferritin, vitamin B12 (and folate), thyroid function, and coeliac antibodies. Say if you take metformin, an acid suppressant, or eat little or no animal food. Keep eating gluten until the coeliac test is done.
- Review medicines and alcohol. Ask a pharmacist whether anything on your list is known to affect concentration. Notice whether foggy days follow drinking days.
- Only then, if fog persists, run a time-limited food trial. One suspect, removed for two to four weeks with notes, then reintroduced deliberately. A trial has an end date; a restriction based on a hunch does not.
Ordering out
The kitchen needs an instruction, not a theory.
Say: "Could I have the grilled fish or chicken with the salad and vegetables, and a small portion of the rice on the side rather than as the base?"
Not: "I think carbs give me brain fog, what is good for that?"
If you have diagnosed coeliac disease, the hidden gluten post has the more specific wording.
Where our AI nutrition coach fits
The hardest part of brain fog is that the causes are scattered across your week, sleep in one place, lunch in another, wine on Thursday, and no one is holding them side by side. That is a pattern-organising job, and it is what a personalised dietary AI agent is built for: it can hold your fog scores next to what you actually ate and slept, flag that the worst afternoons follow the biggest carbohydrate lunches or the shortest nights, suggest a lunch that keeps you steadier, and draft the questions to bring to your GP.
What it cannot do is order or read a blood test, diagnose coeliac disease, a thyroid problem or depression, or tell you to change a prescribed medicine. Those are clinical decisions. The coach keeps the food and routine side steady while a clinician looks at the rest. For the split between what a coach and a professional each do well, see what an AI nutrition coach can and cannot do.
Frequently asked questions
Can food cause brain fog? Yes, sometimes, but it is rarely the only cause. A large refined-carbohydrate meal can lower alertness for an hour or so, coeliac disease is linked to cognitive symptoms that improve on a gluten-free diet, and low iron or B12 impair attention and memory. Sleep, alcohol, thyroid function, medicines and mood are at least as common and worth checking in parallel.
Does gluten cause brain fog? In coeliac disease, a small study found cognitive tests improved over a year on a gluten-free diet (Lichtwark et al., 2014). In people without coeliac disease, the evidence is weak. Get the coeliac blood test while you are still eating gluten, before you remove it.
Which blood tests should I ask for if I have brain fog? Full blood count and ferritin, vitamin B12 and folate, thyroid function, and coeliac antibodies are the usual starting set. Mention metformin, acid-suppressing medicines and a vegan or vegetarian diet, as these raise the chance of B12 deficiency.
Are food sensitivity IgG tests worth doing for brain fog? No. The EAACI task force found IgG4 against foods reflects normal exposure, not intolerance, and does not recommend the tests for diagnosis (Stapel et al., 2008).
Why do I get brain fog after eating? Most often a large, carbohydrate-heavy meal, which research links to more fatigue and less alertness in the first hour, or a poor night's sleep that the meal exposes. If it happens after every meal regardless of what you eat, or comes with pain, bloating or weight loss, see a GP.
Can dehydration cause brain fog? Mild dehydration of around 1 to 2 percent of body weight reduced concentration and increased fatigue and headache in controlled trials of young adults. The effect is modest, but the fix is free.
How long should I try cutting out a food? Two to four weeks, with notes, then a deliberate reintroduction. If nothing changes, the food goes back in. Elimination is a test, not a lifestyle.
Sources
- Lim J, Dinges DF. A meta-analysis of the impact of short-term sleep deprivation on cognitive variables. Psychological Bulletin, 2010.
- Armstrong LE, et al. Mild dehydration affects mood in healthy young women. Journal of Nutrition, 2012.
- Ganio MS, et al. Mild dehydration impairs cognitive performance and mood of men. British Journal of Nutrition, 2011.
- Mantantzis K, Schlaghecken F, Sünram-Lea SI, Maylor EA. Sugar rush or sugar crash? A meta-analysis of carbohydrate effects on mood. Neuroscience and Biobehavioral Reviews, 2019.
- Murray-Kolb LE, Beard JL. Iron treatment normalizes cognitive functioning in young women. American Journal of Clinical Nutrition, 2007.
- de Jager J, et al. Long term treatment with metformin in patients with type 2 diabetes and risk of vitamin B-12 deficiency: randomised placebo controlled trial. BMJ, 2010.
- Lam JR, Schneider JL, Zhao W, Corley DA. Proton pump inhibitor and histamine 2 receptor antagonist use and vitamin B12 deficiency. JAMA, 2013.
- Lichtwark IT, et al. Cognitive impairment in coeliac disease improves on a gluten-free diet and correlates with histological and serological indices of disease severity. Alimentary Pharmacology and Therapeutics, 2014.
- Gunn C, Mackus M, Griffin C, Munafò MR, Adams S. A systematic review of the next-day effects of heavy alcohol consumption on cognitive performance. Addiction, 2018.
- Coupland CAC, et al. Anticholinergic drug exposure and the risk of dementia: a nested case-control study. JAMA Internal Medicine, 2019.
- Soriano JB, et al. A clinical case definition of post-COVID-19 condition by a Delphi consensus. Lancet Infectious Diseases, 2022.
- Rock PL, Roiser JP, Riedel WJ, Blackwell AD. Cognitive impairment in depression: a systematic review and meta-analysis. Psychological Medicine, 2014.
- Stapel SO, et al. Testing for IgG4 against foods is not recommended as a diagnostic tool: EAACI Task Force Report. Allergy, 2008.
- NHS. Vitamin B12 or folate deficiency anaemia: symptoms. NHS. Underactive thyroid: symptoms. NICE. Thyroid disease: assessment and management, NG145, 2019.
Educational content, not medical advice. Brain fog has many causes, some of which need a blood test or a clinical assessment to find. See a GP if it is persistent, getting worse, started after an infection or a new medicine, or comes with weight loss, pain, numbness, low mood or changes in speech or movement. Do not stop a prescribed medicine without talking to the person who prescribed it.

Written by
Shideh Heravi
Gut health & clean eating, in your inbox
New posts on food intolerances, gut health and safer eating no spam, unsubscribe anytime.
By subscribing you agree to receive emails from HealthBlokk about gut health, food intolerances, and product updates. You can unsubscribe anytime.