Inclusion Criteria:  The patient understands the essence of all procedures planned in the framework of an initiative clinical trial and voluntarily confirms his desire to participate by written informed consent; Male or female patients with completed skeletal growth at the age of 30 to 60 years, inclusively, with thyroid pathology and moderate to severe OSAS according to cardiorespiratory monitoring with obstruction of the soft tissues of the upper respiratory tract at the levels of the oropharyngeal and laryngopharynx, without radiography of the pathology of the paranasal sinuses; Еhe patient is scheduled for thyroid gland surgery (thyroidectomy with / without lymphadenectomy, subtotal resection of the thyroid gland, hemithyroidectomy).  Exclusion Criteria:  Women during pregnancy, childbirth; Women during breastfeeding; Persons with mental disorders; Persons detained, taken into custody, serving a sentence in the form of restriction of freedom, arrest, imprisonment or administrative arrest; Chronic somatic diseases in the stage of decompensation. Conditions and concomitant pathology of other organs, which are a contraindication for general anesthesia and intubation; Diseases and conditions associated with severe bleeding disorders (hemophilia, von Willebrand disease, deficiency of one or more coagulation factors, etc.); Infectious diseases in the acute stage. Severe brain injuries, which entailed consequences in the form of focal epilepsy, encephalopathy, dementia; Pathology of the paranasal sinuses according to X-ray data; Pathologies that are relative contraindications for CPAP therapy (bullous lung disease; pulmonary emphysema; a history of pneumothorax, pneumomediastinum, pneumocephalus, respiratory distress syndrome, external liquorrhea; previous surgical interventions on the brain, middle or inner ear, pituitary gland; recurrent sinusitis; recurrent eye infections; severe hypotension; severe dehydration; frequent nosebleeds; fractures of the bones of the face; condition after esophagectomy in history (risk of damage to the anastomosis due to increased pharyngeal / esophageal pressure); hemodynamic instability; a history of severe chronic heart failure; Decompensation of major diseases; cardiomyopathy of any genesis; oncological diseases (except for pathology of the thyroid gland); Pathologies that are absolute contraindications for CPAP therapy (unconsciousness of the patient; severe respiratory failure, which may require intubation and subsequent mechanical ventilation; cerebrospinal fluid fistula; collapse of the epiglottis according to sleep endoscopy); refusal of the patient to carry out CPAP therapy.