Effective planning and managing medical waste necessitate a crucial focus on both the public and private healthcare sectors. This study uses machine learning techniques to estimate medical waste generation and identify associated factors in a representative private and a governmental hospital in Bahrain. Monthly data spanning from 2018 to 2022 for the private hospital and from 2019 to February 2023 for the governmental hospital was utilized. The ensemble voting regressor was determined as the best model for both datasets. The model of the governmental hospital is robust and successful in explaining 90.4% of the total variance.Similarly, for the private hospital, the model variables are able to explain 91.7% of the total variance. For the governmental hospital, the significant features in predicting medical waste generation were found to be the number of inpatients, population, surgeries, and outpatients, in descending order of importance. In the case of the private hospital, the order of feature importance was the number of inpatients, deliveries, personal income, surgeries, and outpatients. These findings provide insights into the factors influencing medical waste generation in the studied hospitals and highlight the effectiveness of the ensemble voting regressor model in predicting medical waste quantities.