Flipping through the top selling apps on the iPhone, I ran across an app named "Sleep Cycle". I checked it out. This app uses the phone's accelerometer (motion-sensor) to monitor the degree of movement while you sleep. You set an alarm time and, based on what stage of sleep you are in, it will wake you within 30 minutes of that alarm. The idea is you aren't woken during a deep stage of sleep.
As a physiology instructor, I was interested to see how well this app worked and how much of it was just novelty. So if you'll indulge me, let me speak briefly about sleep cycles.
We alternate between "non-rapid eye movement" (NREM) and "rapid eye movement" (REM) sleep during the night. For the typical person, it takes about 45 minutes to slip through the first two stages of NREM and into the latter two, when true deep sleep occurs. (Incidentally, nightmares tend to occur in the latter two stages of NREM.) After about 90 minutes, brain activity changes dramatically, our muscles become inhibited, and our eyes start flicking around (thus the name of the sleep). Most dreaming occurs in REM; the muscle paralysis keeps us from acting out our dreams, even though the eyes are following what is being seen. The brain activity is "more awake" during REM than when we are actually awake. The typical adult will re-enter REM about every 90 minutes; each time, REM lasts a little longer. NREM is thought to help physiological processes "reboot" (if you will), while REM is thought to work through psychological needs.
My first night with the app did show fairly consistent time frames for the typical sleeper that I described above. I entered a state of no-motion (which is REM) about every 90 minutes. I apparently had two such stages during my 7 hours of sleep, which by the way is arguably not enough cycles through REM, and the second was longer than the first. (I started to enter a third, but about that time my pet woke me up. Ha ha.)