Think of it holistically, routines in the morning and before bed. What activities and thought patterns keep you awake at night.
What you're doing in the morning should be a good positive motivator. I book morning exercise classes, the desire to do those is motivation to go to bed. A problem sometimes is doing something late that I really want to finish before bed, as if somehow it can't wait. I'm working on breaking that habit.
Don't rely on motivation tho, it comes and goes. What you're aiming to do is establish habits that you do semi automatically. It takes work to do that, some analysts and honesty about existing habits and figuring out how to break them. Think positively tho, not "I want to stop this" but "I want to do .. instead".
Good luck! It won't come overnight in an instant, you chip away at it and celebrate the progress. Be kind to yourself about any setbacks, it's normal
I hope it makes sense, I've had to really really shorten what I've learnt about myself, habit changing & how brains work