Disclosed is a method for detecting sleep onset. A set of respiratory features are determined from a measure of respiratory flow. These features are then thresholded and a sleep state score is determined based on the thresholding, which is indicative of a sleep state. Sleep onset is then determined as a function of the thresholding and the determined sleep state score.