There are 14 layers of networks, with the 30 s epoch as the input, the first two epochs and the last one as the temporal background, and the original signal as a sample, without the need for domain-specific feature extraction methods [17]. On the other hand, [18] proposed a CNN network architecture based on network depth to improve the classification performance of CNNs, which achieved 81% classification accuracy. Ref. [19] Using 90S EEG signal as an epoch as input, the network architecture of superimposed micro-neural network and compression-excitation (SE) block was proposed, which achieved 85.3% accuracy on the Sleep-EDF data set. Furthermore, [20] used a two-dimensional convolutional network to classify raw data from three channels (i.e., EEG, ECG, and EMG). Finally, [21] proposed a fast convolution method that uses 1D convolution and a layered Softmax method in the classification layer to improve computational efficiency. CNN models have achieved some results in automatic sleep classification, but it is clear that hand-designed features perform better than the original signal. It may be since when sleep experts score the sleep stages of a period, they usually find sleep-related events (e.g., frequency components: \(\alpha\), \(\beta\), \(\delta\), and \(\theta\), k-complex, sleep spindle) in that period. The relationship between sleep stages of adjacent periods is then analyzed. The CNN model does not consider the temporal information the sleep expert uses in determining the sleep stages in each period. In addition, the CNN network has certain limitations that lead to a less-than-optimal model, so the application of an improved network is warranted. Some researchers have started to apply RNNs (recurrent neural networks) to sleep staging [22; 23; 24; 25; 26; 27]. RNN is able to maintain internal memory, condition historical information, and learn temporal information from input sequences using feedback connections. Their main strength is that they can be trained to understand patterns of variation between EEG signals and to obtain a temporal correlation of the data, for example, to identify the next possible sleep stage in a series of ephemeral information transformation rules [22]. [PERSON] [23] used RNNS to provide both feedforward and feedback connection channels, facilitating the capture of relevant information before and after sleep. Another study [24] used RNNs to obtain information about the time interval at which CNNs acquire features in each epoch, using a sleep staging model based on a single-channel EEG signal, using CNNs with different convolutional ker-nels to extract features from the original signal separately and then feeding them into a long short-term memory (LSTM) for learning, on the publicly available dataset Sleep-EDF obtained an overall accuracy of 82.0%. [PERSON] et al. [25] used RNN to analyze representative features extracted from sub-epochs within the temporal context within and between epochs, achieving an accuracy of 85.3% on the Sleep-EDF dataset. Furthermore, [26] used a combination of CNN and LSTM to extract the time-frequency features and learning time information of EEG signals and train a classifier for sleep staging. Finally, [27] proposed a sleep learning segmentation algorithm based on low sampling frequency pressure sensing signals. Convolutional neural networks were used to extract sleep segmentation features, and LSTM neural networks were used to extract time series features. The results show that considering both intra-epoch and inter-epoch temporal context is beneficial to improve automatic sleep scoring. However, LSTM has many structural parameters, complex computations, and long model training time, which affects the training efficiency of the model [28]. This paper proposes NAMRTNet, an automatic sleep stage staging model based on an improved hybrid network ResNet-TCN and NAM attention mechanism.