Very rarely, however I do know a developer who dreamed a full day's work where he solved a big problem and was then really confused when all of his hard work didn't exist the next morning.
http://en.wikipedia.org/wiki/August_Kekul%C3%A9#The_ouroboro...
There are many other similar stories of various kinds of technical problems being solved during sleep and/or while dreaming.