This would almost work for me, except one of the “when I feel like sleeping” times aligns with the peak of workday, and “when I fell perfectly awake and refreshed” is too late.
It was like that for me too when I worked 9-5 (or more like 6). Now I work "biphasal" days so to speak, from 12:00-16:00 and sometime later in the evening for a couple hours. I find that splitting it up helps me be more productive, I have more of my "software development energy" to spend. I'm lucky that my work offers very flexible hours since we hire around the globe and nobody in my team minds that I review their MRs in the middle of the night.
I usually use the day hours as "open office time" for support requests and meetings, and the later time as "proper work time". This helps me avoid context switches.
Too late for whom? Apparently, not for you. With WFH, taking a nice little siesta isn't impossible (and anecdotally sounds like its more common than some would like to admit). Of course, forced to work in an office makes it harder, and probably surrounded by bosses much less sympathetic to the concept.
I usually use the day hours as "open office time" for support requests and meetings, and the later time as "proper work time". This helps me avoid context switches.