Sleep posture is closely related to sleep quality, and can offer insights into an individual’s health. This correlation can potentially aid in the early detection of mental health disorders such as depression and anxiety. Current research focuses on embedding pressure sensors in bedsheets, attaching accelerometers on a subject’s chest, and installing cameras in bedrooms for sleep posture monitoring. However, such solutions sacrifice either the user's sleep comfort or privacy. This study explores the effectiveness of using contactless ultra-wideband (UWB) sensors for sleep posture monitoring. We employed a UWB dataset that is composed of the measurements from 12 volunteers during sleep. A stacking ensemble learning method is introduced for the monitoring of sleep postural transitions, which constitute two levels of learning. At the base-learner level, six transfer learning models (VGG16, ResNet50V2, MobileNet50V2, DenseNet121, VGG19, and ResNet101V2) are trained on the training dataset for initial predictions. Then, the logistic regression is employed as a meta-learner which is trained on the predictions gained from the base-learner to obtain final sleep postural transitions. In addition, a sleep posture monitoring algorithm is presented that can give accurate statistics of total sleep postural transitions. Extensive experiments are conducted, achieving the highest accuracy rate of 86.7% for the classification of sleep postural transitions. Moreover, time-series data augmentation is employed, which improves the accuracy by 13%. The privacy-preserving sleep monitoring solution presented in this paper holds promise for applications in mental health research.