When I'm writing code I'm boxed into production mode. Get. Shit. Done. But, particularly when the work I am doing is self-directed and self-prioritized (aka my own startup or side project), I need hours away to really think about the big picture.
Activities that are away from the bombardment of input of my computer/phone work best for me. Let my mind wander. Think about different ways to approach problems. I often find there are higher priority things to do than whatever I thought I was going to code up next.