Given that the exponential pace of growth in wireless traffic has continued for more than a century, wireless communication is one of the most influential innovations in recent years. Massive Multiple-Input Multiple-Output (M-MIMO) is a promising technology for meeting the world's exponential growth in mobile data traffic, particularly in 5G networks. The most critical metrics in the massive MIMO scheme are Spectral Efficiency (SE) and Energy Efficiency (EE). For single-cell MMIMO uplink transmission, energy and spectral-efficiency trade-offs have to be estimated by optimizing the number of base station antennas versus the number of active users. This paper proposes an adaptive optimization technique focusing on maximizing Energy Efficiency at full spectral efficiency using a Genetic Algorithm (GA) optimizer. The number of active antennas is estimated according to the change in the number of active users based on the proposed GA scheme that optimizes the EE in the M-MIMO system. Simulation results show that the GA optimization technique achieved the maximum energy efficiency of the 5G M-MIMO platform and the maximum efficiency in the trade-off process.