Using data from a contact microphone stored under the matress, a graph of the movement is tracked. By reading this graph the various sleep phases can be tracked and allow the sleeper to be awakened in his lightest sleep using a build in speaker.