Sleep apnea is a disease that occurs due to the decrease in oxygen saturation in the blood and directly affects people's lives. Detection of sleep apnea is crucial for assessing sleep quality. It is also an important parameter in the diagnosis of various other diseases (diabetes, chronic kidney disease, depression, and cardiological diseases). Recent studies show that detection of sleep apnea can be done via signal processing, especially EEG and ECG signals. However, the detection accuracy needs to be improved. In this paper, a ML model is used for the detection of sleep apnea using 19 static sensor data and 2 dynamic data (Sleep score and Arousal). The sensor data is recorded as a discrete signal and the sleep process is divided into 4.8 M segments. In this work, 19 different sensor data sets were recorded with polysomnography (PSG). These data sets have been used to perform sleep scoring. Then, arousal status marking is done. Model training was carried out with the feature vector consisting of 21 data obtained. Tests were performed with eight different machine learning techniques on a unique dataset consisting of 113 patients. After all, it was automatically determined whether people were diseased (a kind of apnea) or healthy. The proposed model had an average accuracy of 97.27%, while the recall, precision, and f-score values were 99.18%, 95.32%, and 97.20%, respectively. After all, the model that less feature engineering, less complex classification model, higher dataset usage, and higher classification performance has been revealed.