The Sleep app taps into the accelerometer in your phone to record your movement throughout your sleep. How much you move or not, determines whether you’re in light or deep sleep. The peaks and troughs that you will see in your graph correlate to your movement. The peaks in your graph represent a less restful sleep, so your aim is to have a plateaued graph.
You can also choose to rate your own sleep via the app or desktop!