Set how long you want to sleep, and delay it with moving the phone time to time.
If the phone move a little bit, the application will know that you are awake and will delay the alarm. After you are asleep it will let you sleep for a given hour and than wake you up.