Originally Posted by
ve4grm
As darkrose 50 said, it could be diet if something has changed recently. While gluten and "chemicals" are the go-to boogeymen today, it might be anything, including a newly-developing allergy to something you were always able to eat before. A doctor could tell you more, if this is correct.
The more likely culprit these days is sleep. Make sure you're getting enough each night.
And of course there's mental health. Brain fog can be a symptom of anxiety and depression (plus others, I'd imagine), so if you've been experiencing those feeling outside of the brain fog I'd encourage you to see your doctor to discuss it.