From NYMag:

Past research has described sudden insight, in contrast to conscious analysis, as an all or nothing system: In timed lab experiments, when someone using insight to solve a problem fails to arrive at the correct answer, its often because they let the time elapse without venturing a guess; when theyre using analysis, its more likely they offered several wrong answers along the way. The caveat, of course, is that things like Cartesian geometry and Yesterdayarent timed lab experiments, and existing research cant speak much for the sudden bursts of creativity that take place in the real world. So maybe take your shower thoughts with a grain of salt, but that doesnt mean you shouldnt keep on letting your mind wander while you shampoo.