Obstructive sleep apnea (OSA) is a highly prevalent sleep disorder associated with increased daytime sleepiness and cardiovascular risk. Continuous positive airway pressure (CPAP), requiring a pressure-generating device connected via tubing to a mask during sleep, is an effective treatment. However, patients’ adherence to CPAP is often suboptimal. Behavioral interventions are effective in improving adherence to CPAP. We aimed to provide proof of principle for the operation of a low-cost, self-standing, internet-based system to measure and promote adherence to CPAP. The system is composed of triaxial acceleration sensors attached to the CPAP mask and to the wrist, able to record CPAP usage information, and a mobile app that collects such information and, thorough a chatbot, feeds back to the patient to improve adherence to treatment. The mask subsystem identifies time periods when the mask is put on based on relatively high values of the ratio between acceleration spectral power at frequencies 