Objective To investigate the guiding value of bedside lung ultrasound and lung stretch index for optimal positive end-expiratory pressure (PEEP) in lung recruitment of patients with acute respiratory distress syndrome (ARDS). Methods From February 2020 to October 2023, 90 patients with ARDS requiring invasive mechanical ventilation were selected from the Department of Critical Care Medicine, the Second Affiliated Hospital of Zhengzhou University. According to the setting method of PEEP after lung recruitment, they were randomly divided into an ultrasound group (45 cases) and a stretch group (45 cases). Both groups were treated with PEEP incremental method for lung recruitment, and the ultrasound group was treated with bedside ultrasound-guided method to set PEEP after lung recruitment. PEEP was set by lung stretch index method in the stretch group. The dynamic changes of oxygenation index (PaO2/FiO2), dynamic compliance (Cdyn), mean airway pressure and peak airway pressure were monitored before lung recruitment and 15 min, 1 h, 6 h and 24 h after lung recruitment. Heart rate, mean arterial pressure and central venous pressure were monitored before and 24 h after lung recruitment in the two groups. The optimal PEEP value and the corresponding volume at the end of recruitment were explored. The mechanical ventilation time, ICU hospitalization time, incidence of barotrauma, incidence of extrapulmonary organ failure, and 28-day mortality were recorded as well. Results After lung recruitment, the oxygenation index, Cdyn, mean airway pressure, and peak airway pressure in the ultrasound group were higher than those in the stretch group at 15 min, 1 h, 6 h, and 24 h after recruitment (all P<0.05). There was no significant difference in heart rate, mean arterial pressure or central venous pressure between the two groups at 24 h after lung recruitment (all P>0.05). After lung recruitment, the optimal PEEP value and the corresponding volume at the end of recruitment in the ultrasound group were higher than those in the distraction group (both P<0.05). The mechanical ventilation time and ICU stay in the ultrasound group were shorter than those in the stretch group (both P<0.05). There was no significant difference in the incidence of barotrauma, extrapulmonary organ failure rate or 28-day mortality between the two groups (all P>0.05). Conclusions Both bedside lung ultrasound-guided PEEP and lung stretch index-guided PEEP can improve oxygenation and respiratory compliance, and have no adverse effects on hemodynamics. Bedside lung ultrasound-guided PEEP can make the alveoli fully expand, which is more conducive to improving patients’ oxygenation and respiratory compliance, and the guiding value is higher than the lung stretch index.