There is an app called Sleep As Android that I used to use. You put your phone on your bed next to you and it tries to determine what level of sleep you’re in. You tell it when you’d like to get up and if it detects that you’re in a lighter stage of sleep within a certain amount of time before that, it triggers the alarm. You’re then more likely to hear it, and more likely to feel rested, than if it went off like, twenty minutes later.