Sleep often helps me solve problems, I've never mastered the art of actually writing code in my sleep. And that's probably a good thing.