Once inertia is created it's easier to keep the ball rolling. You have so much context loaded in your brain you don't want to stop as you know how slow it is to reload into cache.
I'm not a fan of pair programming, especially for things requiring deep thinking. But it does seem to jump start momentum in a painless way.
Don't forgot to have a Zen like coffee break and walk. We are not robots. Squeeze too hard, for too long and no more juice comes out.
But I do have habits I've developed over decades of working from home. I have a room dedicated solely to working. If I'm in there, I'm working. If I'm not in there, I'm not working. I get up, get ready for work, and "commute" to my office in the morning just as I do when going into an office. It's part of of the mental shift into work mode.
Also I use intervals, I have basic analog timer, but I don't use pomorodo technique. If I'm in the flow state I can work much longer then originally intended without interruptions
1. You are your own boss and aiming to create something worthwhile. If you can't focus get a job. See below.
2. If you are being paid for your time you might consider not focussing as theft.