Accurate sleep staging for patients with sleep disorders requires the integration of multiple channels and various signal modalities. While graph convolutional networks (GCNs) have significantly improved sleep staging accuracy by effectively processing complex data, current GCN-based methods often require a large number of signal channels and struggle to capture temporal correlations effectively. They are leading to a large limitation in the scope of graph network models in sleep staging. To address these challenges, we propose an attention-based spatial-temporal graph network for sleep staging, named ASTGSleep. ASTGSleep effectively addresses the temporal continuity of sleep data and overcomes limitations related to the number of channels by integrating the temporal graph construction and feature extraction module (TGFEM). TGFEM captures dynamic temporal features through temporal graph construction, complementing spatial features and enhancing sensitivity to sleep stage transitions. Moreover, the multidimensional fusion module (MDFM) optimizes and fuses these spatiotemporal features using a graph attention network (GAT), further improving accuracy and robustness in sleep staging. Experimental results demonstrate that ASTGSleep achieves competitive accuracy on datasets with different numbers of channels, such as MASS-SS3 with 26 channels (87.0%) and SleepEDF-20 with three channels (86.5%). Furthermore, its performance on sleep disorder datasets, including CAP (81.4%) and clinical REM Sleep Behavior Disorder from Changzheng Hospital (CZ-RBD) (82.7%), shows robust generalization and enhanced accuracy, making it a promising tool for automatic sleep staging in clinical diagnostics.