CPAP machines provide a steady stream of pressurized air through a mask to keep the airways open during sleep. This is particularly beneficial for patients suffering from obstructive sleep apnea (OSA), where the airway becomes blocked during sleep, causing breathing pauses and disrupted sleep.