Underwater acoustic sensor networks (UASNs) have been widely applied in marine scenarios, such as offshore exploration, auxiliary navigation and marine military. Due to the limitations in communication, computation, and storage of underwater sensor nodes, traditional security mechanisms are not applicable to UASNs. Recently, various trust models have been investigated as effective tools towards improving the security of UASNs. However, the existing trust models lack flexible trust update rules, particularly when facing the inevitable dynamic fluctuations in the underwater environment and a wide spectrum of potential attack modes. In this study, a novel trust update mechanism for UASNs based on reinforcement learning (TUMRL) is proposed. The scheme is developed in three phases. First, an environment model is designed to quantify the impact of underwater fluctuations in the sensor data, which assists in updating the trust scores. Then, the definition of key degree is given; in the process of trust update, nodes with higher key degree react more sensitively to malicious attacks, thereby better protecting important nodes in the network. Finally, a novel trust update mechanism based on reinforcement learning is presented, to withstand changing attack modes while achieving efficient trust update. The experimental results prove that our proposed scheme has satisfactory performance in improving trust update efficiency and network security.