This study investigates the impact of hyperparameter optimization on the performance of Random Forest classifiers for Human Activity Recognition (HAR), a critical component in wearable computing applications such as health monitoring, rehabilitation, and fitness tracking. A baseline Random Forest model, trained using default hyperparameters without optimization, was first established for reference. Subsequently, three optimization techniques, Grid Search Cross Validation, Randomized Search Cross Validation, and Bayesian Optimization using the Tree-Structured Parzen Estimator (TPE), were applied to fine-tune model parameters for improved predictive accuracy. The publicly available UCI-HAR dataset, which was collected from 30 individuals using a waist mounted smartphone to record human activities, served as the experimental platform. Hyperparameter optimization resulted in a 0.15 percent increase in classification accuracy, from 96.23 percent to 96.37 percent, and a 0.08 percent improvement in the Receiver Operating Characteristic Area Under the Curve (ROC-AUC), from 0.9976 to 0.9984, while precision, recall, and F1 score remained stable across models. However, Grid Search Cross-Validation and Randomized Search Cross-Validation significantly increased training times to 1197 seconds and 210 seconds, respectively, compared to 1 second for the baseline model. Bayesian Optimization maintained a model training time similar to the baseline but required 172 seconds for parameter selection, representing a moderate computational cost. These findings highlight the trade off between marginal performance improvements and computational efficiency, identifying Bayesian Optimization as the most practical and computationally efficient strategy for real time HAR applications.