Energy efficiency (EE) maximisation is one of the most important necessities of the fifth‐generation (5G) wireless networks. In this study, both power allocation and channel assignment issues for the cellular network underlaid with device to device (D2D) communication are introduced. The main objective is to assign the users’ resources in order to maximise the total EE of the network. The distributions of both the D2D users (DUs) and the cellular users (CUs) are based on the stochastic geometry theory. Hence, the mathematical formula for the optimisation problem is demonstrated. Additionally, the resource allocation link admission (RALA) algorithm is proposed to achieve the maximum EE. Moreover, it assigns the optimal powers for each CU and DU in the system. Furthermore, the best channel assignment for each new D2D link request is determined. The optimisation problem in the RALA scheme is solved by utilising a proposed modified Cuckoo search algorithm. Furthermore, the complexity analysis for the proposed scheme is introduced. From simulation results, the proposed RALA scheme is efficient to assign the resource allocation for the users to achieve the near‐optimal EE.