Optimal formulas usually have a very strong subjective component. It makes them very hard to find via search. It also makes them hard to package and recommend as a package.
Personally I had this problem you described for many years and even found that it powered overwork and workaholism cycles.
What I did was shift the perspective from the work/rest dichotomy to the reflect/program dichotomy.
Work and rest were clouding the other out. There is too much awkward overlap. For example there are types of rest that can't effectively be scheduled on demand, but which will be felt to still require work. And there are types of work that will require intentional rest or forbearance. So both of these situations leave you with a problem of a dichotomy that breaks or hinders your ability to execute appropriately.
My system involves a lot of different prompts that get at the intuitive day-state in this kind of case.
What I want is a sense of where I'm at metaphorically and emotionally (interests, values), as a way to be comfortable and ride the current wave. Examples of tools I use:
https://www.friendlyskies.net/maybe/intuition-cues-for-advan...
https://www.friendlyskies.net/maybe/frontdooring-a-new-form-...
(I'm offering these but also offering them as examples of things I built myself, that you may need to build for yourself)
These tools will help me understand: What is this time good for? What kind of schedule is appropriate for that?
The schedule, even if loose, and quite different, is still worth aiming for. I also refer to this schedule as a program and consider it central to computer programmer psychology (personal theory).
I also set a sort of meta-timer on my watch or desktop during these times, usually from 15m to 30m intervals. This is associated with a meta-loop framework with things like: Hydrate, stretch, ask if switching contexts is appropriate, and so on.
Overall this is less of an optimization issue now that I understand one's lifetime as less in one's full control. There will always be some annoying chaos, and psychology has taught us that denying it can be very unhealthy and even make it stronger.
In order to have more control over the chaotic parts one must first be willing to understand the voice of the chaos as fundamentally opposed to dictation and turn it into a lightly-structured listening and checking-in exercise. (You can view chaos as fundamentally tractable to processes based in some depth of consideration, and intractable to blanket, machine-like dictation)
Just some of my own perspectives--good luck.
PS I've shared my text file structure in recent comments as well.