Having your subconscious solve the hard puzzles for you is great at the time... but I wonder whether that has a flow on effect to insomnia. You want your brain to be thinking, working, but sleeping is supposed to be rest time...
Perhaps there are short term vs long term trade offs.
I've been experimenting with caffeine. So far I'm getting some surprising results. Amongst hackers the common view is that it makes you faster or even a little bit smarter or more productive. What I've found though is that it actually makes you more impatient. Being impatient and wired to a high level of alertness may mean that you pump out a lot of code ... but what is the quality of it?
Really good code requires really deep thinking, and caffeine driven impatience is counter-productive.
Also, it makes it harder to get to sleep...