There are no mechanisms to achieve this that are foolproof. (Recall that “nothing is foolproof, because fools are so ingenious”.)
Nothing will fix this problem short of:
1. Getting adequate sleep, and
2. Making the decision that you will get up and stay up when it is time to, and then
3. Sticking to that decision.
As @Jeruba has correctly noted (in first place, also correctly) you need to go to bed earlier. At your age you should know how long you sleep “normally” when you’re not under the influence of drugs and alcohol, when you haven’t had too much liquid to drink before going to be (so that your bladder isn’t waking you earlier than you would arise on your own) and when it just “feels right” to get up (and even though you might choose to sleep in when given your druthers, when it “feels like a guilty pleasure” to do that).
For me, that’s seven hours. I’ve known that for fifty years. If I get less than seven hours of sleep in a normal night, then I’m going to have difficulty (generally) getting out of bed the next day. I can do that easily enough several times a month if I need to, as I often do need to for travel, early-morning meetings and other such appointments. But I can’t do it routinely, so I don’t try to. It will make me cranky, inefficient, tired and ill-feeling all day, and I don’t like that feeling. So I go to bed when my body tells me “it’s time”, and I sleep without alarms of any kind except for those special occasions. And when the alarm goes off on a “special occasion” day, I have already made the decision that I have to get up or the day is really going to go to hell: if I miss my flight; if I’m late for a team meeting or a doctor’s appointment, or if I let down my boss in some way, then there will be hell to pay. And I dislike that even more than the extra sleep I could get if I ignore the alarm.
On weekends and vacation days I absolutely love to stay up late and sleep until noon (or read until I fall asleep and then wake up, read some more, nap and read again) or until the dorg tells me, “Dude, it’s time.”
Your body is telling you that you are failing to account for its needs. It’s high time that you start.