Sorry to post a serious comment on a shit post, but just in case this is bugging anyone:
Turn the clock away from your bed. The anxiety from potentially not getting enough sleep can prevent you from falling asleep in a vicious cycle.
Sometimes people can even be sleeping for quite a while without realizing they had been sleeping, then just look at the clock and be like, oh no I lied here for another hour with no sleep, and feel even worse, and now ironically be unable to fall back asleep. If it's bad enough sometimes people can even get what's called paradoxical insomnia. Where the person will insist they hadn't been sleeping or barely slept, even if you had them in a sleep lab with video and eeg and you show them they've been sleeping for hours (they aren't trying to lie or anything, it's an issue with perception of sleep amount and the perceived low amount then causing symptoms and distress).
Anyways, set that alarm, turn the clock away. Stop micro-calculating how much time until morning.
Description of paradoxical insomnia from a patient point of view if anyone's interested:
Probably fairly sleep deprived. I'm older now, but I never did fall asleep easily. And I've always had night terrors and violent nightmares, so I wake up in panic most of the time, and it takes hours for my heart rate to go down enough to fall asleep again.
I guess I average 4 to 5 hours of sleep on a good night. But, I don't feel sleepy during the day, my heart races all day long also, I think I'm just built not to be able to settle down.
But you also have to adjust for the fact that the calculation itself is going to take a few seconds, and you'd then have to adjust for the time it takes to do the adjustment and you probably end up with an implicit numerical scheme you have to solve