Keep a list of small features/tweaks to the side and use them as jumping off points. Takes a little bit of forethought, but I keep a txt file in the repo with a list of things like class implementation tweaks or ui changes that I know are 15-30 minute tasks. I reserve these for when I'm having trouble ramping up.
Or failing that, 15 minutes of cranking out garbage code that I know I'll revert helps get back into flow state too, but it's demoralizing deleting work.