The present invention relates to a device and a method for detecting whether a bedridden person is getting out of bed or has fallen out of their bed. The device performs an analysis over time of the distances between the sensors of a detector and the objects that are present in the detection field of the detector. The detection is based on variations in said distances and of the locations thereof within the monitored space.