Aspects of automatically detecting periods of sleep of a user of a wearable electronic device are discussed herein. For example, in one aspect, an embodiment may obtain a set of features for periods of time from motion data obtained from a set of one or more motion sensors in the wearable electronic device or data derived therefrom. The wearable electronic device may then classify the periods of time into one of a plurality of statuses of the user based on the set of features determined for the periods of time, where the statuses are indicative of relative degree of movement of the user. The wearable electronic device may also derive blocks of time each covering one or more of the periods of time during which the user is in one of a plurality of states, wherein the states include an awake state and an asleep state.