This research addresses the accuracy issues in IoT-based human activity recognition (HAR) applications, essential for health monitoring, elderly care, gait analysis, security, and Industry 5.0. This study uses 12 machine learning approaches, split equally between support vector machine (SVM) and k-nearest neighbor (k-NN) models. Data from 102 individuals, aged 18–43, were used to train and test these models. The researchers aimed to detect twelve daily activities, such as sitting, walking, and cycling. Results showed k-NN models achieved slightly higher accuracy (97.08%) compared to SVM models (95.88%), though SVM had faster processing times. The improved machine learning approaches proved effective in accurately classifying daily activities, with k-NN models outperforming SVM models marginally. The paper provides significant contributions to the field of HAR by enhancing the performance of SVM and k-NN classifiers, optimizing them for higher accuracy and faster processing. Through robust testing with samples of real-world data, the study provides a detailed comparative analysis that highlights strengths and weaknesses of each classifier model, specifically within IoT-based systems. This work not only advances the theoretical understanding and practical applications of HAR systems in areas, such as healthcare and industrial automation, but also sets the stage for future research that could explore hybrid models or further enhancements, consequently improving the efficiency and functionality of IoT devices based on activity recognition.