I experience brain fog about once every two weeks in exactly the way you describe and I've thought it's anxiety as well. I tried describing this to a psychiatrist and a cardiologist and neither of them took me seriously and said it's nothing. The only thing that helps me is meditation followed by weightlifting, and it helps tremendously. The hard part is that it always occurs around late-morning/early-afternoon, so if I'm at work I just have to suffer at my desk and get nothing done for the rest of the day.
I came across the mental disorders 'depersonalization' and 'derealization'. People usually describe it as feeling foggy or like a dream. Maybe that might be what you mean and help you explaining it.
The 'depersonalization' is probably the 'fog' I'm talking about. But I know that sleep deprivation can also cause it, so I hope that I have something treatable related to my sleep.