There's an Android app called "Sleep" where you set an alarm window and put your phone on the corner of your bed, and the alarm only goes off when it detects you're a little active already and not in deep sleep (using the accelerometer to detect movement). If it doesn't detect enough activity it'll go off regardless at the end of the window.
It has a bunch of other features as well (rating how well you slept and detecting patterns to give advice, a snore detector, etc) but that alarm is the one I use it for.
The window is 90m, to account for 90m sleep cycle. I set the alarm to whichever multiple of 90 falls within the wake up window.
As a result, I sleep somewhere with 7h to 7h30 consistently, with the odd ~6h sleep day or ~9h in special circumstances (being sick).