A method and wireless sensor device for determining a time period a person is in bed. In one aspect, a method includes utilizing a wireless sensor device to obtain a plurality of acceleration samples in relation to at least one axis associated with a persons body over a predetermined time window. The method also includes calculating a polar angle for each acceleration sample within the predetermined time window. The method also includes calculating a fraction of an amount of time within the predetermined time window that the polar angle is greater than an angle threshold that indicates that the person is lying down, where if the fraction is greater than a predetermined threshold, the predetermined time window is marked as a period the person is lying down.