I've long ago realized that going to sleep with a prepared mind (occupied by the problem) would often result in a working solution when waking up in the morning. Once read an article that research showed that studying before sleep would increase retention 30% compared to studying in the morning. So at night your brain is actively working and you can take advantage of that.
I use this technique and also try solving or visualize difficult problems to make myself sleep, it's better than reading books. In the morning I'll probably have a better perspective on the problem, sometimes I'll just realize it can be avoided with another feature, or it's something I shouldn't care about in the near time.