Due to unrivaled effectiveness, non-orthogonal multiple access (NOMA) has risen as a promising multiple access scheme for the Internet of things (IoT). In this paper, we provide a new power allocation technique for improving the energy and spectral efficiency of NOMA-enabled IoT devices. The power allocation is performed without compromising the quality of service (QoS) requirements of the network. By considering the transmit power, QoS and successive interference cancellation (SIC) constraints, we use the sequential quadratic programming (SQP) technique to solve the non-convex problem. To assess the performance of our scheme, we compare the proposed SQP-based approach with the conventional KKT-based optimization method. We provide Monte Carlo simulation results to assess our proposed power allocation framework and illustrate the performance improvements against orthogonal multiple access (OMA) scheme. The results uncover that the proposed SQP-based power optimization design substantially improves the performance of the NOMA-enabled IoT network.