Underwater acoustic sensor networks (UASNs) are vital for applications like marine environmental monitoring, disaster prediction, and national defense security. Due to the prolonged exposure of underwater sensor nodes in unattended and potentially hostile environments, the application of UASNs is confronted with numerous security threats. Trust models are an important means to detect anomalous nodes in UASNs and ensure security. However, when confronted with intricate underwater surroundings, the assessment of trust is prone to disruption, and current trust models lack a flexible mechanism for updating trust. Consequently, this study introduces a dynamic evaluation trust model (DRFTM) for underwater acoustic sensor networks that integrate deep reinforcement learning and the random forest algorithm. First, the DRFTM comprehensively considers indicators including communication, data, energy, and environment to provide reliable trust evidence for the next evaluation; second, under the conditions of node mobility and dynamic updating of network topology, we propose a predictive model for assessing the trust status of sensor nodes based on random forest training; last, the utilization of deep reinforcement learning is instrumental in determining the most effective trust update strategy, leading to improved detection accuracy of the trust model. The simulation results demonstrate the effectiveness of the DRFTM in detecting malicious nodes, reducing false positives, and accurately assessing trust, achieving a remarkable 99% accuracy in identifying malicious nodes.