An apparatus is provided for controlling air supplied under pressure to a patient suffering from sleep disorders such as apnoea. The apparatus measures and/or calculates the inspiratory air flow, volume and pressure to the airway. Controlled pressurized air is supplied to the patient's upper anatomical airway, wherein the apparatus measures the air flow and pressure to the airway. The apparatus determines whether to increase or decrease the pressure to the patient's airway based on a determination of one or more factors, such as the occurrence of hypopnoea, hyperventilation, obstructive or central apnoea, air leakage and acoustical vibrations. Occurrences of events representing a sleep problem may be stored by the apparatus and retrieved by a clinician at a later date.