As a result of continued expansion of 5G technology, the density of IoT devices has increased dramatically.Increasing the throughput of 5G systems is now extremely important. Non-orthogonal multiple access technologiesand Ultra-dense networks have lately attracted a lot of attention in the context of Internet of Things networksbecause to their capacity to multiplex from the space domain and power domain. In order to boost systemthroughput, this article integrates non-orthogonal multiple access technology with ultra-dense network technology,taking into consideration orthogonal frequency division multiplexing non-orthogonal multiple access-based ultradensenetworks with several base stations. The network model and the channel model were created first. As aresult, under the condition of total power, the downlink transmission rate maximization problem is formulated.Then, the problem is divided into two subproblems to solve: device grouping and sub-band power distributionand built the best power allocation strategies by using convex optimization theory to these subproblems. Finally,numerical simulations are undertaken to validate the efficiency of proposed optimal downlink power distributionapproach and the total throughput of the system has substantially enhanced as compared to orthogonal Multipleaccess.