While the lightning is still to be caught in the bottle I have played around with time blocking my coding once I start. I time my code commencement (which is harder than for you I guess) with around 9-10 minutes to get the code flowing.
I used to use the Pomodoro technique to code for around 25 minutes at a stretch and then pause, maybe exercise a bit around every full hour.
Now I feel I have completely bought into the 2 minutes and push method.
I can even play with five 2 minute sessions as standing in for the starter block of 10 minutes that gets me into flow most of the time. Now it has a more defined feature set.
I can then aim for around 10 to a dozen commits and pushes.
Then short breaks where I diffuse my mental landscape or absorb other ideas from another field...
I could (probably) write a haiku or a verse of poetry in 5 minutes so I could start experimenting with that.
Then every hour I could pull a 15 kg sandbag 40 times OR stay in plank position to exhaustion. I am not so good at it yet since I have just started, to need more than a couple of minutes and a few minutes to return to normal pulse.
Always Be Closing - put the code in a state where it could be released every two minutes.