Dreaming of code is something that happens to me very frequently when I'm working on difficult problems and only the first few times was cool.
Now, when I dream of code, I can hear my inner self saying "no, please! I actually want to rest" because most of the times I feel like I'm in a loop exploring the same solutions over and over.
I've had to get out of bed and do something else so I can go back to sleep without having one of those weird dreams.