The Rapidly-Exploring Random Tree (RRT) algorithm has demonstrated proficiency in adapting to path search challenges within high-dimensional dynamic environments. However, a notable limitation of the RRT algorithm lies in its inability to fulfill the criteria for achieving the shortest and smoothest path for mobile sensing nodes. To address the limitations of the conventional RRT algorithm and enhance the path planning for mobile robots, this paper proposed an innovative approach named M-RRT, designed to overcome the aforementioned shortcomings and optimize the path planning process for mobile sensing nodes. First, the search area is constructed according to the defined coverage density. After searching the path in the search area, the RRT algorithm uses the greedy method to delete the intermediate nodes in the path, and obtains the uniquly optimal path. Finally, the Bezier curve is used to optimize the path, which makes the path shortest and meets the dynamic requirements of the mobile node. Simulation results show that M-RRT has better path and faster convergence speed than traditional RRT, which can better meet the planning requirements of mobile nodes.