From a mathematical perspective, Wireless Sensor Networks (WSNs) are increasingly recognized for their utility across multiple sectors such as environmental oversight, healthcare monitoring, and process automation within industries. A paramount obstacle within WSNs is the management of energy efficiency, given that the sensor nodes are typically powered by batteries with finite energy reserves. The criticality of developing efficient routing protocols cannot be overstated, as they are instrumental in extending the operational lifespan of the network and guaranteeing dependable data communication. This study is centered around the mathematical modelling and performance evaluation of an innovative routing methodology that integrates machine learning algorithms to augment energy efficiency within WSNs. The novel routing strategy dynamically adjusts its operations in response to the immediate environmental and network states, aiming to minimize energy expenditure and elevate the network's overall efficiency. Through comprehensive numerical simulations, this research scrutinizes the efficacy of the machine learning-enhanced routing protocol against conventional routing methodologies, accentuating its advantages in energy savings and reliability in data transmission. The simulation framework encompasses a variety of network configurations, traffic distributions, and environmental contexts, employing metrics such as energy utilization, network longevity, packet delivery ratio, and latency to offer an in-depth examination of the machine learning-based routing approach's performance. Findings from the simulations affirm the algorithm's enhanced energy efficiency, which contributes to prolonged operation of sensor nodes and steadfast data communication across dynamically changing network landscapes. The implications of this study highlight the transformative potential of machine learning in redefining routing protocol design and optimization within energy-restricted WSNs. By elevating both energy efficiency and network functionality, this research marks a significant stride towards realizing sustainable and dependable WSNs, paving the way for their broader application in essential services.