As I also experienced this, the trick is that you keep your mind focused around the problem, even when you go to sleep. I already mentioned you need to make trying to solve the problem your big thing of the day. Of course if you try to solve a problem and at the same day got almost robbed or were close to having an accident (or something really nice happened) your brain is most likely to process that instead at sleep or mix things up.