While distractions are a terrible burden on logical thinking, they may be useful when you're trying to solve insight problems or conjure up creative ideas. A recent study found that your optimal productivity times are actually suboptimal when you need to use your brain in new and different ways. Scientific American's Cindi May explains:
Insight problems involve thinking outside the box. This is where susceptibility to "distraction" can be of benefit. At off-peak times we are less focused, and may consider a broader range of information. This wider scope gives us access to more alternatives and diverse interpretations, thus fostering innovation and insight. Indeed, [the study] found that participants were more successful in solving insight problems when tested at their non-optimal times.
To be clear, this doesn't mean you should procrastinate and jump on Facebook for a few hours to avoid your work, but rather put on some music or go somewhere you don't necessarily work well. Put distractions around you so your mind could be drawn elsewhere at any moment. It may lead to some good ideas.
The Inspiration Paradox: Your Best Creative Time Is Not When You Think [Scientific American]