Sleep apnea is a common sleep disorder. Traditional testing and diagnosis heavily rely on the expertise of physicians, as well as analysis and statistical interpretation of extensive sleep testing data, resulting in time-consuming and labor-intensive processes. To address the problems of complex feature extraction, data imbalance, and low model capacity, we proposed an automatic sleep apnea classification model (CA-EfficientNet) based on the wavelet transform, a lightweight neural network, and a coordinated attention mechanism. The signal is converted into a time-frequency image by wavelet transform and put into the proposed model for classification. The effects of input time window, wavelet transform type and data balancing on the classification performance are considered, and a cost-sensitive algorithm is introduced to more accurately distinguish between normal and abnormal breathing events. PhysioNet apnea ECG database was used for training and evaluation. The 3-min Frequency B-Spline wavelets transform of ECG signal was carried out, and Dice Loss was used to train the classification model of sleep breathing. The classification accuracy was 93.44%, sensitivity was 88.9%, specificity was 96.2% and most indexes were better than other related work.