Yup! I've also found what I eat is important.
Carbohydrates to be a source of brain fog as I get older. I've also found cutting them out to 0g/day seems to increase anxiety for me (studies have shown reducing it below a certain amount... 50g?... definitely increases cortisol, a stress hormone). So finding a good balance in the diet is key.