I noticed extra inspiration on bathroom breaks as well, but as a control I tried just getting up and walking outside and back, and that seemed to have the same effect for me.
There's something going on during that context switch.
It feels like because all of the data about a problem is being unloaded into long term memory, when you return to the problem, you parse the entire data as once instead of adding to it in pieces.
It almost feels like a puzzle except the second time looking at it, you're looking at the whole thing you've solved versus just the piece you last added.
I feel Luke ta a mixture of context switch and some idle time/downtime. I find walks great for letting my thoughts drift and work through things, same goes for train journeys. I think perhaps as you say, the switch unloads the information into your subconscious and then the downtime let’s it get to work.
I really liked Rich Hickeys talk on Hammock Driven Development which is basically this exact subject: load everything into your brain and then go snooze on a hammock while your mind gets to work.
It would be an interesting experiment to think on a problem, then swap to a different office and see if that gives you a different perspective and insight.
I totally agree. When faced with a problem outside the comfort zone, sometimes the brain focuses too much on a part that may turn out to be irrelevant. Having a break and returning later usually works wonderfully to again see the big picture.
It feels like because all of the data about a problem is being unloaded into long term memory, when you return to the problem, you parse the entire data as once instead of adding to it in pieces.
It almost feels like a puzzle except the second time looking at it, you're looking at the whole thing you've solved versus just the piece you last added.