A system and method for treating obstructive sleep apnea (OSA) by means of a Continuous Positive Airway Pressure (CPAP) system in which is included an ultra-violet light source to remove bacteria and contaminants which may cause respiratory infection in a patient being treated. The ultraviolet light source is contained in a specially designed chamber comprising aluminum or equivalent suitable materials. The ultraviolet chamber is positioned directly downstream of a humidification unit and includes specially positioned baffles to protect connecting elements and other system components from any possible damage.