The ever-increasing requirement of massive connectivity, due to the rapid deployment of internet of things (IoT) devices, in the emerging 5th generation (5G) mobile networks commands for even higher utilization of the available spectrum. Non-orthogonal multiple access (NOMA) is a promising solution that can effectively accommodate a higher number of users, resulting in increased spectrum utilization. In this work, we aim to maximize the total throughput of a NOMA system, while maintaining a good level of fairness among the users. We propose a three-step method where the first step matches the users to the channels using a heuristic matching algorithm, while the second step utilizes the particle swarm optimization algorithm to allocate the power to each channel. In the third step, the power allocated to each channel is further distributed to the multiplexed users based on their respective channel gains. Based on extensive performance simulations, the proposed method offers notable improvement, e.g., 15% in terms of system throughput and 55% in terms of user fairness.