I have been working from home for over 20 years. So most of my routines are “flexible” because I already possess the discipline to get work done, in pj’s or not. What I do forget to do, however, is take breaks.
Utilizing the Pomodoro Technique helps with not only focus, but also adding in much needed breaks .
There are many apps out there you can use (phone or computer) and you can set your times how ever it works for you. I do 45 minutes on 15 off. The best way to start is 20 on 5 off.
After working for 20, an alarm will sound. Get out of your chair. Stretch. Get some steps in by walking from room to room. Grab a snack. Skritch your cats head. Then when the timer goes off again - its back to work. Repeat.
Hope that helps.