This article investigates a new autonomous mobile fog computing (MFC) system empowered by multiple unmanned aerial vehicles (UAVs) in order to serve medical Internet of Things devices (MIoTDs) efficiently. The aim of this article is to reduce the energy consumption of the UAVs-empowered MFC system by designing UAVs’ trajectories. To construct the trajectories of UAVs, we need to consider not only the order of SPs but also the association among UAVs, SPs, and MIoTDs. The above-mentioned problem is very complicated and is difficult to be handled via applying traditional techniques, as it is NP-hard, nonlinear, non-convex, and mixed-integer. To handle this problem, we propose a novel simulated annealing trajectory optimization algorithm (SATOA), which handles the problem in three phases. First, the deployment (i.e., number and locations) of stop points (SPs) is updated and produced randomly using variable population sizes. Accordingly, MIoTDs are associated with SPs and extra SPs are removed. Finally, a novel simulated annealing algorithm is proposed to optimize UAVs’ association with SPs as well as their trajectories. The performance of SATOA is demonstrated by performing various experiments on nine instances with 40 to 200 MIoTDs. The simulation results show that the proposed SATOA outperforms other compared state-of-the-art algorithms in terms of saving energy consumption.