Sleeping is the most essential and longest duration human activity, yet we know very little of the wonderful rhythms in us. We will not address any medical diagnoses nor treatments here, they need to be directed to medical professionals. We simply describe the commonly accepted sleep stages (called hypnogram), please see references such as Wikipedia for more detailed descriptions.
Sleep stages are classified as 1. Wake, 2. Drowsy, 3. Sleep I (shallow), 4. Sleep II, 5. Slow Wave (Sleep III & IV) and REM sleep, generally according to EEG signals.
1. Wake: eye closed, alpha wave is generally present, and beta and higher frequency wave is reduced;
2. Drowsy: transition period when theta wave increases and alpha wave decreases (more lower frequency content);
3. Sleep I: start occurrences of sleep spindles or sigma wave;
4. Sleep II: more spindles (sigma wave);
5. Slow Wave (deep sleep): more spindles (sigma wave), together with delta wave (lowest frequency);
6. REM: disappearance of spindles, loss of muscle tone (no EMG), with beta wave (dreaming).
For those consumers who simply have interests in learning about themselves, low cost bio-sensor based gadgets had opened many ways to peek into our own sleep conditions. However, over-zealous marketing of various products actually made the situation more confusing than ever. Let's attempt to clarify how the various sensors work and their limitations. (We apologize for any over-simplifications here.)
1) motion sensor: usually accelerometer attached to limbs, head or body trunk, can detect motions and posture (including orientation) activities. the underlying assumption is if you're not moving, then you are probably in sleep. The problem is, if you don't move a lot, even as you're staring the ceiling the whole night, the program may assure you that you just had a restful good sleep.
2) heart rate sensor: can be one of many sensor types, such as ECG (electrical signal) sensor, blood flow (oxygen/colored light) sensor, or pulse (tactile pressure) sensor. the heart rate variability (HRV) can be extracted, and its unique patterns or cycles can be correlated with various sleep stages.
3) brain wave sensor: single or multiple-channel EEG sensor. The most reliable method.
Example ECG(HRV): dramatic RR (inverse of Heart Rate in BPM) changes during sleep and other activities.