Waste management remains a significant environmental health challenge in Indonesia. According to data from the National Waste Management Information System (SIPSN) managed by the Ministry of Environment and Forestry, national waste generation in 2024 reached approximately 33.79 million tons, originating not only from households but also from educational settings such as Islamic boarding schools. This study aimed to determine the relationship between students’ knowledge, attitudes, and practices and the optimization of waste management at Nurmilad Boarding School, Wajo Regency. This was an analytical study with a cross-sectional design, involving all students as the population, with a total sampling of 67 respondents. Data were collected through questionnaires and observations, then analyzed using univariate and bivariate methods with the chi-square test at a significance level of p < 0.05, along with the calculation of Odds Ratio (OR) and 95% Confidence Interval (CI). The results showed a significant relationship between knowledge and waste management optimization (p = 0.025; OR = 6.5; 95% CI = 1.33–31.7), attitudes (p = 0.041; OR = 5.78; 95% CI = 1.18–28.3), and practices (p = 0.000; OR = 48.21; 95% CI = 5.90–395), with practices being the most dominant factor. In conclusion, there is a significant relationship between students’ behavior and the optimization of waste management. Strengthening practical approaches and improving infrastructure are recommended to enhance effective waste management in boarding school environments.