A method of predicting an onset of apnea is described. Motion of a subject, including at least breathing-related motion, is sensed, and a signal corresponding to the sensed motion is generated. A breathing-related signal is extracted from the sensed motion signal, and the onset of apnea is predicted at least partially in response to analyzing the breathing-related signal. Other applications are also described.