SleepSense detects your movements during the night by using your phone’s accelerometer. It keeps track of all the different phases of your sleep and attempts to wake you during a light sleep phase.

SleepSense uses an adjustable time window (e.g. 30 minutes) before the set alarm time and wake you at the optimal moment. You will feel rested and ready to start the day.

http://forum.xda-developers.com/showthread.php?t=705122