Oh yes, being awake at 2:30am due to extra coffee is certainly not sustainable. Sleep is amazing and a lack of sleep is horrid.
I’m sensitive to caffeine but like the comfort of a hot drink throughout the day, but like yourself, also feel the need for caffeine to stay motivated.
So, to seek a solution, whenever I needed a hot drink but could do without the caffeine, I now make a chai tea from a teabag, finding a good make takes time tho, as the branded chai teas are too weak and watery, whereas I get the supermarket one that is stronger in flavour.
And then for focus, you may want to try ‘Lion’s Mane’ mushroom tea. It helps with focus, and also anxiety, depression, ADHD. All sorts. It is a mild, pleasant taste, and no caffeine. You want to go for the purest, natural beat filtered kind you can get, which can get more expensive.
To help with sleep, Reishi mushroom tea is meant to be good, also good for calming. The taste is pretty bitter though.
Personally, I’ve found experimenting with hot drinks a good way to add pleasure to life, helps you get out of bed or through the day when you have a nice new hot drink to try.