I can only speak from personal experience, but I've removed fog almost entirely by removing sugar and carbohydrates from my diet (Ketogenic), and doing intermittent fasting (IF).
My energy levels are always elevated, I sleep better, and the clarity of thought that comes with a Keto + IF combination is something I only wish I had known about when I was younger.
Whilst I'm speaking anecdotally, the benefits are grounded in science and is something that anyone can try. Once you get over the initial "keto adaptation" period the rewards will be well worth the effort.
Also, intermittent fasting (and even just removing sugar) is something that can be done separately if you're not a fan of low/zero carb lifestyles.