This study presents a method for investigating the differences in elderly and middle-aged EEG functional networks in eyes-open and eyes-closed states, as well as during a simple working memory task. Seven graph theory features were used, including local efficiency, global efficiency, clustering coefficient, characteristic path length, node strength, node betweenness centrality, and assortativity. Our analysis showed significant differences in both resting and working memory states. The seven network features were utilized as inputs for the classification models to distinguish between middle-aged and elderly EEG networks. In a resting state, a maximum accuracy of 93.33% was obtained in the eyes-closed state using KNN. In addition, KNN obtained the highest accuracy of 98.89% in the WM task state, with all seven features used in this study. The local and global efficiency, as well as the clustering coefficient, were the common features showing significant results in the eyes-open and eyes-closed states, as well as under a WM task condition. Our findings underscore the efficacy of working memory in investigating changes in brain network topology in relation to healthy aging. The eye blinks and