It's challenging to get enough sleep consistently. There never seems to be enough time in the day to do everything, and then sometimes I just get excited about a project and forget to sleep.
The trouble with not enough sleep is that it starts to affect your cognition, and at some point you will need to catch up on lost sleep. I can work for 48 hours without sleep when necessary (usually when overseas working), but it's not good once the task is completed. You start to feel pretty terrible, and catch up sleep is never as good as periodic sleep. The other problem is that midnight comes around so fast. If you relax and don't keep your eye on the time after dinner, you can get to midnight without realizing it.
I recognize that the benefits of sleep come from regular sleep, regular wake up times, and quality sleep (as a result of a peaceful transition to bedtime, and a routine that doesn't involve checking your phone as the last thing you do).
Firstly, if you have a lot on, it seems to me that you need to be more careful about how you spend your waking hours, so that you can be ready to sleep each evening. This is what I need to do - because often the late nights are a result of finishing something that is due tomorrow (or it's just because I got carried away with a task or a book). There are two ways to overcome these problems - planning and discipline.
I did a quick check of APPs available online to support your sleep. Did you know you can get an APP to help you sleep by playing music till you fall asleep, or fall asleep to white music, and even be woken up in the part of your sleep cycle that will give you the best start to your day? The clock section on my iphone has a new 'bedtime' alarm system - pretty useful. All of this is pointless if you don't go to bed early enough to get enough sleep. My bedtime setting on the iphone helped me realise that a 9 hour sleep, with a 5:30am wake time was requiring a bed time of 8:30. Unrealistic.
How much sleep do you really need to function at your best? Answer this question by giving yourself enough time to sleep. I'm still working this out. Last year I started a new plan - aiming to be in bed before midnight. This last week I've been in bed before midnight only twice. To master your health, you need to be the master of your sleep.