However, the most creative or insightful thoughts often come upon us out of the blue.
I once had a professor who told his students they'd need 8 hours to prep for his final. Some number of hours should be spent reading material, some number spent quizzing and memorizing, but crucially, he said, we all ought to spend an hour or two just going on a walk.
Taking your mind off the immediate task doesn't mean you stop thinking about it. All the ideas just disappear behind the curtain, only to remerge in new and unexpected costumes and scenes.
That's where insight comes from.