I ended up being diagnosed with sleep apnea and once I started using a CPAP device and got used to sleeping with the mask on (took about 1-2 months), it was the difference between me being completely awake and having the energy to work on challenging things immediately after waking up vs feeling like a zombie for the first 3-4 hours every day.
I've never really had problems with "motivation" or discipline so I can't really speak on that, but getting this diagnosed and resolved has completely changed my attitude and capability for taking on new problems and not feeling "burnt out" all the time.