An actigraph contains an accelerometer, which detects motion through changes in acceleration. The collected data is then analyzed to differentiate between periods of sleep and wakefulness based on the frequency and intensity of movements. This method is particularly useful for tracking sleep in naturalistic settings outside of a sleep lab.