Apparatus and methods are described including identifying that a subject suffers from sleep apnea. Positive airway pressure (PAP) is applied to the subject via a mask placed on a face of the subject. A respiratory-related parameter of the subject is sensed, while the mask is on the face of the subject, and a need of the subject for respiratory support is assessed, responsively to the respiratory-related parameter. In accordance with the assessed need, the mask is configured to regulate the PAP provided to the subject's face. Other applications are also described.