During exam time I'd often experience hallucinations of equations, but even crazier were the dreams: sometimes I couldn't wake up unless I performed a mathematical operation on some regular object, ie. "what's the Laplace Transform of this blue chesterfield?"
Yes, and also computing. Among other things, I've had a dream where I was trying to open files and had to win a race against someone who was replacing them with evil symlinks; several dreams about copy-on-write B+Trees; and a dream where I was a mutex and was trying to keep threads straight except that I got confused when I was locked recursively.
It's cool to see that this is a pretty common thing.
During awake time, when I'm actively studying/using a new technique, things can get mixed up. I might be absorbing information, but not necesarily using it very efficiently. I just plow on, trying things out, playing around. (Perhaps because most of what I do is self-directed studying, so getting unstuck is left up to myself.)
After days like this, when I sleep, it's fitful. I'll dream of people tormenting me until I can do something in O(n) time, garbage collectors chasing me, whatever. But oddly, often times when I wake up, I have a calm and a better unstanding of whatever it was I was studying. And sometimes, I'll wake up with a start, with a clear solution to a particular problem in mind.
I also have the same exact experience with coding. For example, I'll have to write a for loop in order to perform actions, such as eating cereal.
Happens to me all the time.