For example if you usually sleep at 2 am, you start by sleeping 3 hours later at 5am then sleep at 8am the next day then 12pm, then 3pm after that and so on until you reach the desired time. Seems weird but it works wonders. You may need someone to keep you accountable and stick to the set schedule for the week though.
I used to have the same problem. I used to sleep around 2-3 am. I tried everything from turning to a strict schedule to putting phone in a different room but none of it worked. Then read about Chronotherapy where you delay your usual sleep time by 3 hours every day for a week until you reach the desired time then you stick to it. https://en.m.wikipedia.org/wiki/Chronotherapy_(sleep_phase) Now I go to bed around 10:30 and it has vastly improved my wellbeing.
I use Spendee to track expenses. They are using firebase so its quite easy to get your data with a script. I then use the expenses csv file along with other journal files. Expenses are most boring to enter and Spendee solves that nicely.