I've never tried it, but it seems plausible. I often go to bed thinking of a problem and wake up with its solution.
As with many areas of sleep research though, the studies are vague at best. The only way to really find out is to give it a try. I'm very keen to hear how things go for you.