There is described an apparatus (1) for respiratory support and non-invasive detection of alveolar derecruitment for patients suffering from respiratory failure. Such an apparatus (1) generally comprises a mechanical ventilator (3) for inspiration/expiration functions and means (15) allowing to impose an additional periodic pressure component (Pstim) having a higher frequency than the spectral content of the inspiration/expiration pressure component (Presp). There are provided computing means (12) to obtain the inspiratory average reactance (Xrs) of the respiratory system of the patient (2) as the positive end-expiratory pressure (PEEP) varies, in order to detect the presence of alveolar derecruitment. There is also described a procedure allowing to obtain an optimal positive end-expiratory pressure.