This paper considers a UAV-enabled mobile edge computing (MEC) system, where a UAV first powers the Internet of things device (IoTD) by utilizing Wireless Power Transfer (WPT) technology. Then the IoTD sends the collected data to the UAV for processing by using the energy harvested from the UAV. In order to improve the energy efficiency of the UAV, we investigate how the UAV can optimally exploit its mobility via hovering design. To achieve this, a new time division multiple access (TDMA) based workflow model is proposed in this paper. The new model allows parallel transmissions and executions in the UAV-assisted system, thus it can minimize the UAV hovering time and reach the energy saving purpose. We aim to minimize the total energy consumption of the UAV by jointly optimizing the IoTDs association, computing resources allocation, UAV hovering time, wireless powering duration and the services sequence of the IoTDs. The formulated problem is a mixed-integer non-convex problem, which is very difficult to solve in general. We transform and relax it into a convex problem and apply flow-shop scheduling techniques to solve it. Furthermore, an alternative algorithm is developed to set the initial point closer to the optimal solution. Simulation results show that the total energy consumption of the UAV can be effectively reduced by the proposed scheme compared with the conventional systems.