A method (and system) for detecting sleep apnea involves determining a first characteristic such as the sleep stage, and detecting an apnea event based on a physiological sensor signal using selection of a detection algorithm which is dependent on the determined first characteristic. By taking account of the first characteristic (such as sleep stage) when performing an automated apnea detection process, the accuracy of the apnea detection is improved.