The expected traffic demands for the coming years requires a major technology development. Indeed, from 2017 to 2022, the global annual traffic growth is estimated to reach 220%. This annual growth leads in turn to an increase in the number of users connected to IP networks, going from 2.4 to 3.6 devices connected per person. Currently, 4G networks are capable of handling this load, but the irruption of the 5G breakthroughs, expected to be at full operation by 2020, is visible. However, 5G technologies may come along with a considerable power consumption if they are not devised properly. As a consequence, a key issue in the developing of these networks is to make them energetically sustainable. In this work, a preliminary study of the optimization of various aspects of the 5G system is presented. It addresses the configuration of the different basic parameters of the system and optimizes the power transmitted by the base stations to obtain simultaneous improvements in system capacity and its power consumption for a massive connections scenario. To the best of our knowledge, this is the very first time this type of 5G scenario is optimized with these two performance criteria.