The battery-powered wireless sensor network (WSN) is a promising solution for structural health monitoring (SHM) applications because of its low cost and easy installation capability. However, the long-term WSN operation suffers from various concerns related to uneven battery degradation of wireless sensors, associated battery management, and replacement requirement, and ensuring desired quality of service (QoS) of the WSN in practice. The battery life is one of the biggest limiting factors for long-term WSN operation. Considering the costly maintenance trips for battery replacement, a lack of effective battery degradation management at the system level can lead to a failure in WSN operation. Moreover, the QoS needs to be ensured under various practical uncertainties. Optimal selection with a maximal number of nodes in WSN under uncertainties is a critical task to ensure the desired QoS. This study proposes a reinforcement learning (RL) based framework for active control of the battery degradation at the WSN system level with the aim of the battery group replacement while extending the service life and ensuring the QoS of WSN. A comprehensive simulation environment was developed in a real-life WSN setup, i.e. WSN for a cable-stayed bridge SHM, considering various practical uncertainties. The RL agent was trained under a developed RL environment to learn optimal nodes and duty cycles, meanwhile managing battery health at the network level. In this study, a mode shape-based quality index is proposed for the demonstration. The training and test results showed the prominence of the proposed framework in achieving effective battery health management of the WSN for SHM.