A good night's sleep which takes your mind out of conscious thought then resets/defocuses your mind again and you are more receptible to new ways of tackling the problem.
(All of the above is just vague anecdotal evidence, and I have no idea if there is any scientific basis for any of it.)
I find that 'stepping away' from the details after immersion for a few days and allowing the pieces to re-align themselves does seem to pay benefits, even with the mundane and practical problems I need to solve. I agree with the grandparent post that alcohol is not the only de-focusing agent around.
Basically a light version of using drugs for creative stimulation: instead of creating the altered state, tapping the altered states that are already present at certain times.
The default mode network is thought to be involved in creative thinking, and it's most active when you're not actively focused on a task: https://en.wikipedia.org/wiki/Default_mode_network