It feels terrible. When I first experienced it, I was terrified that it would be permanent because that would keep me from doing my job and keeping up with my interests and hobbies. Now I only get this brain-fog every so often. I think it helps me communicate with people better and has helped me learn patience. I finally understand how some people might be genuinely, earnestly trying to understand what I'm trying to say or teach, but can't understand it because I'm communicating it at the right level of analysis.
If you're intellectually gifted (many programmers are), you shouldn't take that for granted. You got lucky, and if you weren't lucky enough to be intelligent, it might have been impossible to do the same kind of work you do today. Please appreciate that.