KIDS: kinematics-based (in)activity detection and segmentation in a sleep case study