Wrist-based respiratory rate (RR) measurement during sleep faces accuracy limitations. This study aimed to assess the accuracy of the RR estimation function during sleep based on the severity of obstructive sleep apnea (OSA) using the Samsung Galaxy Watch (GW) series. These watches are equipped with accelerometers and photoplethysmography sensors for RR estimation. A total of 195 participants visiting our sleep clinic underwent overnight polysomnography while wearing the GW, and the RR estimated by the GW was compared with the reference RR obtained from the nasal thermocouple. For all participants, the root mean squared error (RMSE) of the average overnight RR and continuous RR measurements were 1.13 bpm and 1.62 bpm, respectively, showing a small bias of 0.39 bpm and 0.37 bpm, respectively. The Bland-Altman plots indicated good agreement in the RR measurements for the normal, mild, and moderate OSA groups. In participants with normal-to-moderate OSA, both average overnight RR and continuous RR measurements achieved accuracy rates exceeding 90%. However, for patients with severe OSA, these accuracy rates decreased to 79.45% and 75.8%, respectively. The study demonstrates the GW's ability to accurately estimate RR during sleep, even though accuracy may be compromised in patients with severe OSA.