Using unmanned aerial vehicles (UAVs) as aerial base stations has recently emerged as a promising solution to provide rapid connectivity in several scenarios. Motivated by these, we study a wireless network in which a UAV is an aerial platform and serves terrestrial non-orthogonal multiple access (NOMA) user equipments (UEs). In particular, we assume that the UAV acts as a mobile edge computing (MEC) node, offloading computation from the NOMA UEs. Our goal is to minimize the total power consumption in the network subject to deadline constraints for the computation task of each UE. We propose a framework to optimize both the power allocation and the trajectory of the UAV. To deal with the coupled parameters in the optimization, we decompose the optimization into three subproblems in order to optimize the power allocation, amount of data to be processed per UE per time slot, and trajectory of UAV, respectively. Simulation results demonstrate that the NOMA approach outperforms orthogonal multiple access (OMA) in terms of energy efficiency.