Cardiovascular diseases (CVDs) remain a leading cause of death globally. According to the American Heart Association, approximately 19.1 million deaths were attributed to CVDs in 2020, in particular, ischemic heart disease and stroke. Several known risk factors for CVDs include smoking, alcohol consumption, lack of regular physical activity, and diabetes. The last decade has been characterized by widespread diffusion in the use of wristband-style wearable devices which can monitor and collect heart rate data, among other information. Wearable devices allow the analysis and interpretation of physiological and activity data obtained from the wearer and can therefore be used to monitor and prevent potential CVDs. However, these data are often provided in a manner that does not allow the general user to immediately comprehend possible health risks, and often require further analytics to draw meaningful conclusions. In this paper, we propose a disentangled variational autoencoder (β-VAE) with a bidirectional long short-term memory network (BiLSTM) backend to detect in an unsupervised manner anomalies in heart rate data collected during sleep time with a wearable device from eight heterogeneous participants. Testing was performed on the mean heart rate sampled both at 30 s and 1 min intervals. We compared the performance of our model with other well-known anomaly detection algorithms, and we found that our model outperformed them in almost all considered scenarios and for all considered participants. We also suggest that wearable devices may benefit from the integration of anomaly detection algorithms, in an effort to provide users more processed and straightforward information.