Human sleep postures are inextricably linked to health, which can be used as a pivotal indicator of disease prevention and treatment. To obtain a machine learning model for analyzing the human sleep postures, a new approach is proposed to efficiently recognize the types of sleep postures based on skeleton extraction. Four typical sleep postures, i.e., lying in the supine, prone, left lateral and right lateral, are classified with the method of extraction of key points relation feature as well as the direct coordinate feature, which can extract features of skeleton correctly and effectively. Furthermore, the presented method is applied to a specific scenario, which is utilized for monitoring sleep postures of patients who suffered from Obstructive Sleep Apnea-Hypopnea Syndrome (OSAHS) by making the detailed classification of supine posture. The effectiveness of the proposed framework was validated quantitatively and qualitatively. The performance of the extensive comparison experiments demonstrate that the proposed approach is superior and achieves the state-of-the-art.