Any time they had a problem they couldn't figure out, they'd come to me and ask me to help with it.
My trick was to listen to their problem and then go take a walk. Our office was in a nice area with plenty of sidewalks. So, I'd get the details of the problem and then go take a walk for about a half hour while I thought about the issue.
After the walk I was able to sit down and my computer and implement whatever weird thing it was.
These days I do work from home (freelance) so I find myself pacing around my house while trying to figure out something odd. I think I've worn a groove in the grass at this point.
It really does do wonders for the brain.
Sometimes a relevant idea will just come to me while I'm away (I carry a pencil and bit of paper for such occurrences, as it is very annoying to get back to my desk and forget the beneficial train of thought!), sometimes I'll hit the problem from a slightly different angle when I get back and find success that way.
I think mainly the difference is usually stress. Forcing your mind to think about a particular problem can drive you into a mental rut in which you think the same things over and over and get nowhere, getting more irritated at your lack of getting anywhere as time goes on which creates more stress and makes matters worse. At times like that inspiration is less likely to strike (or be recognised when it does). Having time to ponder a problem, consciously or otherwise, can be very fruitful.
This fits in quite nicely with the idea that the sleep pattern we've evolved is as much about rearranging what we've learnt and experienced while awake as it is about anything else (like the brain's DBA taking time to run DBCC REINDEX on everything so our thinking is more efficient the next day). It also tallies with the fact that some of the most successful people I know are generally more relaxed (and not just because they are more comfortable due to earlier success) than myself!
A developer sitting in another office had written it; I was roped in at the moment the nasty bug was discovered, basically to have a look from a fresh set of eyes. It had to be shipped in a couple of days time.
The neat thing about writing code on paper is the amazing gain in clarity. Of course, like all approaches, it has to be taken with a grain of salt.
It seems to me that the necessity of scrolling on a Laptop screen somehow creates additional cognitive overhead, especially when we want to rapidly jump across sections of code. Perhaps, it forces us being physically away from the machine to reflect more deeply on the problem.
I think you are right, about letting go of all assumptions, and that helps you find the edge cases.
I've found that when I'm in bed trying to fall asleep is when I do a lot of brainstorming for my ideas rather than problem solving
Also, I may have, on one or two occasions, written code on the tile walls with tub crayons.... after all, you get a brilliant idea, you don't want to lose it in the time it takes to dry of.
I'd say that in addition to letting go of assumptions, it's just as much about breaking patterns.
I often find that once I start trying to fix a problem, my brain gets stuck in that way of fixing it and if that doesn't work, it then becomes a matter of fixing the fix, etc. It all just kind of builds up. If I'm standing in the shower with hot water pouring over my head, I can free my mind of whatever I was concentrating on and then new ideas emerge.
But I think it's much deeper than that. It's the basic truth that creativity emerges from a still mind. First you spend hours obsessing in front of the screen seemingly achieving nothing. Later you seemingly do nothing and solve the hardest problems.
It's an excellent practice to take breaks where you do nothing. Pretend to be a smoker and step out for a smoking break every hour or so.