Is there any scientific literature on the "shower principle" (i.e., taking a break from a task leads to unexpected insights)? Folk cognitive psychology has it that doing activities that remove you from your intellectual work (such as taking a shower or, like Einstein is reported to have done when it a rut, playing the violin) increases your chances of having unexpected insights. Is there a name for this phenomenon and a dedicated scientific literature for it?
That moment is often called the "aha moment", the Eureka effect, or more generally, insight.  There is literature on it, but as you might expect, it is a pretty difficult thing to produce in a lab.

Some references:
The AHA! experience: Creativity through emergent binding in neural networks.
Thagard, Paul; Stewart, Terrence C.. Cognitive Science35.1 (Jan-Feb 2011): 1-33.

Gaining insight into the "aha" experience.
Topolinski, Sascha Reber, Rolf. Current Directions in Psychological Science19.6(Dec 2010): 402-405.

The aha! Moment: The cognitive neuroscience of insight.
Kounios, John; Beeman, Mark. Current Directions in Psychological Science18.4(Aug 2009): 210-216.

Neural correlates of the “aha” experiences: Evidence from an fMRI study of insight problem solving.
Qiu, JiangView Profile; Li, Hong; Jou, JerwenView Profile; Liu, Jia; Luo, Yuejia; et al. Cortex: A Journal Devoted to the Study of the Nervous System and Behavior46.3 (Mar 2010): 397-403.