Anyhoo, I mainly write Perl at work as my "job" although I have been known to have a dream and solve a particular programming problem in my sleep - and that's always a bonus :-)
Funny thing is that a co-worker mentioned to me yesterday that he solved a problem in his sleep the previous night. So, it may be more common than you think :-)