Sleep Time works by detecting patterns of generated movement over time while you sleep. We have developed algorithms that differentiate between the various cycles of sleep: light, deep, and REM based on your level of movement.
During deep sleep and REM, your voluntary muscles are paralyzed, minimizing your body movements. In light sleep, your level of movement is reduced compared to when you are awake, but "tossing, turning and shuffling" does occur as the body is still prone to light movement.
http://www.ncbi.nlm.nih.gov/books/NBK10996/