The convergence of communication and computing has lead to the emergence of Multi-access Edge Computing (MEC), where computing resources (supported by Virtual Machines (VMs)) are distributed at the edge of the Mobile Network (MN), i.e., in Base Stations (BSs), with the aim of ensuring reliable and ultra-low latency services. Moreover, BSs equipped with Energy Harvesting (EH) systems can decrease the amount of energy drained from the power grid resulting into energetically self-sufficient MNs. The combination of these paradigms is considered here. Specifically, we propose an online optimization algorithm, called ENergy Aware and Adaptive Management (ENAAM), based on foresighted control policies exploiting (short-term) traffic load and harvested energy forecasts, where BSs and VMs are dynamically switched on/off towards energy savings and QoS provisioning. Our numerical results reveal that ENAAM achieves energy savings with respect to the case where no energy management is applied, ranging from 57% and 69%. Moreover, the extension of ENAAM within a cluster of BSs provides a further gain ranging from 9% to 16% in energy savings with respect to the optimization performed in isolation for each BS.