The increasing duration of online gaming among adolescents has raised public concern, particularly due to its potential impact on sleep quality. Sleep is a fundamental physiological need that is essential for physical growth, mental health, and overall well-being, aligning with Sustainable Development Goal (SDG) 3, which emphasizes ensuring healthy lives and promoting well-being for all ages. Adequate sleep also plays a crucial role in cognitive functioning, learning capacity, and academic performance, which are central to SDG 4, aimed at ensuring inclusive and equitable quality education. Excessive engagement in online gaming may lead to addictive behaviors and reduced sleep duration, ultimately resulting in poor sleep quality among adolescents. This study aimed to examine the relationship between the duration of online gaming and sleep quality among students at SMP Negeri 8 Manado. The study employed a quantitative approach using an analytical survey with a cross-sectional design. A total of 90 students were selected using the Lemeshow formula and stratified random sampling. Data were collected through questionnaires assessing online gaming duration and the Pittsburgh Sleep Quality Index (PSQI). Statistical analysis was conducted using Spearman’s rank correlation test. The findings revealed a significant negative correlation between the duration of online gaming and sleep quality (r = −0.577, p = 0.001), indicating that longer durations of online gaming are associated with poorer sleep quality among junior high school students. These results highlight the importance of regulating online gaming duration as part of health promotion and educational support strategies to enhance adolescent well-being and learning outcomes in line with the SDGs.