I do personally find myself most productive with a cycle of 20 hours awake / 12 hours asleep. Circadian rhythms vary by person.
Unfortunately, the world makes it hard to keep that cycle, and so instead I mostly do 17 hours awake / 7 asleep, which makes me feel constantly tired (though less tired than 16/8 at least).
Im not saying this is what's happening here, it could totally be just that he was burning himself out at work, but it's a truly incredible thing to find something that you love working on and want to dive into to the point that you lose hours at it and have to pull yourself away from it to go to sleep (obviously outside of stuff designed to be addictive and exploitative like gambling that hijack those reward mechanisms). Programming is one of those artistic technical pursuits and a lot of programmers love it in that way. And are grieving losing that with A. At least so far as you felt you could only justify spending time on something you loved like that if you were also paid for it. Nobody is stopping you from opening up a text editor again on your own time. But you know, it's good to be passionate about things. Not being able to sleep until you figure something out, losing track of time while you're lost in whatever you're working in - all that stuff where it's from innate drive and the love of the game? that stuff rules. If it's burnout throw it out but don't throw out the electric stuff that makes us human