Objective We compared the efficacy of noninvasive ventilation with bilevel positive airway pressure added to usual care versus usual care alone in patients undergoing coronary artery bypass grafting. Methods We performed a 2-group, parallel, randomized controlled trial. The primary outcome was time until fit for discharge. Secondary outcomes were partial pressure of carbon dioxide, forced expiratory volume in 1 second, atelectasis, adverse events, duration of intensive care stay, and actual postoperative stay. Results A total of 129 patients were randomly allocated to bilevel positive airway pressure (66) or usual care (63). Three patients allocated to bilevel positive airway pressure withdrew. The median duration of bilevel positive airway pressure was 16 hours (interquartile range, 11-19). The median duration of hospital stay until fit for discharge was 5 days for the bilevel positive airway pressure group (interquartile range, 4-6) and 6 days for the usual care group (interquartile range, 5-7; hazard ratio, 1.68; 95% confidence interval, 1.08-2.31; P = .019). There was no significant difference in duration of intensive care, actual postoperative stay, and mean percentage of predicted forced expiratory volume in 1 second on day 3. Mean partial pressure of carbon dioxide was significantly reduced 1 hour after bilevel positive airway pressure application, but there was no overall difference between the groups up to 24 hours. Basal atelectasis occurred in 15 patients (24%) in the usual care group and 2 patients (3%) in the bilevel positive airway pressure group. Overall, 30% of patients in the bilevel positive airway pressure group experienced an adverse event compared with 59% in the usual care group. Conclusions Among patients undergoing elective coronary artery bypass grafting, the use of bilevel positive airway pressure at extubation reduced the recovery time. Supported by trained staff, more than 75% of all patients allocated to bilevel positive airway pressure tolerated it for more than 10 hours.