The present invention pertains to a system, method, and device for treating sleep disorders. The present invention is particularly useful in the delivery of carbon dioxide (CO2) to a subject and in the treatment of sleep apnea. Furthermore, integration of components with various sensors and apparatuses associated therewith and attached thereto preferably complete a rebreathing circuit in the present invention. In various embodiments of the present invention where the above components are integrated as a rebreathing circuit, a subject is both the source and recipient of a controlled concentration of carbon dioxide. In such embodiments, treatment of sleep disorders becomes much more efficient and effective.