Excellent observation! Yes some foods do contribute to brain fog. But not because those foods are 'foggy' by themselves, they are dense, heavy foods like sweets, dairy or excess fats. However it is because they are adding to an existing state of 'fog' or heaviness in the body or mind, or 'ama', accumulated toxins in Ayurvedic terms. This shows up as a lack of clarity, confusion and demotivation.
Or the brain may be hyperstimulated, stressed and forgetful, then it needs calming, and a different set of supportive foods. It all depends on the current state of imbalance being experienced by the body.
And yes, it can be healed.