The rapid growth of internet access and digital device usage in Indonesia has made gadgets an inseparable part of students’ daily lives. While smartphones facilitate communication and access to information, excessive use—particularly before bedtime—has been associated with poor sleep quality. This quantitative correlational study aimed to identify the relationship between gadget use before sleep and sleep quality among students of SMK Yapim Sibiru-biru. A total of 110 students were selected purposively and asked to complete a structured questionnaire measuring gadget use duration, activity type, use of “Night Mode,” and various aspects of sleep quality. Data were analyzed using descriptive and Pearson correlation tests at a 0.05 significance level. Results showed that 87.5% of students used gadgets before sleep, with smartphones being the most common device. The majority (46.88%) reported using gadgets for 1–2 hours before bed, primarily for social media and entertainment. Most respondents slept between 10:00 p.m. and midnight, with an average sleep duration of 4–6 hours, lower than the recommended 7–9 hours. Statistical analysis revealed a significant negative correlation between gadget use duration and sleep quality—longer use was associated with poorer sleep. Additionally, low awareness of blue light filtering features exacerbated sleep problems such as insomnia and fatigue. These findings highlight the importance of behavioral interventions and sleep hygiene education to mitigate the adverse effects of nighttime gadget use. Recommended strategies include limiting screen time one hour before sleep, enabling “Night Mode,” and engaging in relaxing pre-sleep activities to promote better sleep quality and overall well-being