According to a Fast Company report, sleep can help improve creativity and problem solving.
Your brain is active when you sleep. One of the things that happens during sleep is that memories consolidate. That is, the things you were exposed to during the day are solidified in memory. But not all aspects of the events you experienced are retained. Often, many of the extraneous details of a situation will be lost.
That means that after you sleep, your memory of the problem you are solving will contain fewer surface elements and more essential elements than it did when you first started thinking about it. When you return to the problem after sleeping, your description of the problem will retrieve different information from memory than it did before you slept. In particular, you are much more likely to be able to find an analogy after you have slept on a problem than you were before.