I've got bad brainfog too and mine is caused by food allergies . I went on a juice fast last winter and it completely dissappeared. Essentially solid food causes immune responses in me and these responses cause my brainfog. I guess there can be multiple causes of brainfog.