Massive MIMO (mMIMO) is regarded as a core technology for 5G networks and a key component for the next generation of networks (6G and beyond). The use of mMIMO can provide significant benefits such as increasing data transmission rates, increasing reliability, reducing delay time, increasing spectrum efficiency and energy efficiency. However, a mMIMO system typically uses hundreds or even thousands of antennas to transmit and receive data, which may lead to a huge waste of energy and cause greenhouse gas emissions that are harmful to the environment. This paper investigates the power allocation optimization problem to maximize the energy efficiency of the proposed downlink mMIMO system by adopting convex optimization tool. The effectiveness of the proposed algorithm is then verified via numerical results and implemented through Monte Carlo simulation.