There is a reason why the most competitive and expensive prime-time TV is pushed to the late hours of the evening. A sleepy brain, exhausted from the toll of the day is deprived of most of its remaining willpower. As a result when tired you are most susceptible to suggestion (advertising) and most likely to act on impulses. The longer you remain tired, the more the brain transitions to a state of anxiety, fear of missing out, impulsivity, paranoia, mental drunkenness. Your executive thinking is long gone. As a result, tiredness makes you far more likely to keep consuming content and doom scrolling down social feeds, YouTube streams, and articles. Blue light and colors keep your natural sleepiness from coming in, the content you've consumed goes into your subliminal consciousness, and you're trapped in a sleepless night. Worse, your next day's tiredness guarantees you'd be back for more in a vicious cycle.
The Brain goes through phases throughout the sleep cycle and bench-marking your performance in each phase is one of the best things you can do for your productivity. A full, restful night of sleep gives you back the higher levels of your cortex, allowing you to see more layers of solutions to problems, grasp bigger challenges easily, become your super-you.
I've had the privilege of coding on my own business and projects since the beginning of Grad School. As the only employee for a while, I could never increase my time, but I could try to squeeze as much as possible out of my brain every day. I compared my productivity in each field of my work at different times of day and night, thus increasing the hours I spent with my most productive self and not wasting time with an unproductive brain. Some patterns came up while I did that. (Caveats: 1. Your times may be different, benchmark your brain so you know. 2. No supplements were used in these experiments. I can't drink caffeine, and avoid anything else, so this is all organic.):
I've built an automatically-timestamped journal/memories tool into DreamList. That allows me to jot down any thought, metric, or observation, and then visualize them by tag when needed to surface more patterns. You can only learn from data you have, so preserve as much as you can. The brain is a poor permanent storage device - you can never back-fill data reliably, so output what you can as well.
As more insights come up, I'll be adding them here. Email me at this domain if you want to discuss.