Described is a positive airway pressure system for delivering a flow ofbreathablegas at a positive treatment pressure to a patient's airways to assist intreating a sleepingdisorder. The system comprises a flow generator which supplies a positivetreatmentpressure flow of breathable gases. A flow sensor measures data correspondingto the flowof gases. A processing arrangement receives and analyzes the measured data todeterminethe patient's breathing patterns, determines whether to alter the pressuresupplied by thegenerator based on the breathing patterns, delays the onset of a pressureincrease whenthe patient is in an awake state wherein the delay lasts at least until thepatient is in anasleep state, and determines the patient has transitioned between an awakestate and anasleep state when a combination of obstructions are detected.