With the growing prevalence of the Internet of Health Things (IoHT), there is an increasing need for reliable and precise categorization of electrocardiogram (ECG) indications for the early detection of cardiovascular diseases. In this research, we propose a machine learning approach for ECG classification in IoHT applications. Our solution use wavelet transforms to clean the ECG records before passing them to the model. Then, a stack of long short-term memory (LSTM) cells is built to learn the temporal interrelations in the ECG signals and make accurate predictions. We assessed the performance of our model on a publicly available dataset of ECG signals, achieving an overall accuracy of 97.5%. The experimental findings demonstrate that our models can effectively classify ECG signals in IoHT applications, providing a valuable tool for the early discovery of vascular diseases. Furthermore, our model can be certainly incorporated into IoHT systems, providing a reliable and efficient solution for ECG classification.