Physical health promotion has always been a way for schools to pay close attention to and devote resources to their students' development, physical fitness, and social adaptability. To promote the improvement of students' overall physical quality, we must begin with the foundation and school physical education. This study proposes an improved K-means algorithm based on an analysis of the influencing factors of intelligent optimization of sports facilities and equipment on students' health quality. Clustering analysis is carried out based on two groups of data classified as boys and girls, using the improved K-means algorithm. The findings reveal that the average change trend of physical fitness test items in each male cluster is generally similar, with a moderate change. The change in the average score of physical fitness test items for each cluster of girls in the group showed two distinct valleys, and the trend was complicated. This necessitates schools to invest funds to construct venues and purchase equipment in order to increase the number of sporting events.