A non-invasive method for detection and screening obstructive sleep apnea (OSA) using a TOF camera. The camera is mounted to record the subject's thorax and abdomen from above; two signals describing the movement of the thorax and abdomen, respectively, are obtained by averaging the range values in two fixed regions of interest. Normally, these two signals are in phase, but during an OSA event, they are out of phase. The algorithm detects when the signals are out of phase, and so it is possible to detect an OSA event. When the subject turns in such a way that only an overall respiration signal can be measured, it may be possible to detect OSA events according to unusually low respiration amplitude. This algorithm is used in a new non-invasive method for monitoring the sleep and the recording of sleep apnea events, and the statistics of these events give an indication about the sleep quality.