As a direct consequence of the increasing popularity of Internet and Cloud Computing services, data centers are amazingly growing and hence have to urgently face energy consumption issues. Paradoxically, Cloud Computing allows infrastructure and applications to dynamically adjust the provision of both physical resources and software services in a pay-per-use manner so as to make the infrastructure more energy efficient and applications more Quality of Service (QoS) compliant. However, optimization decisions taken in isolation at a certain level may indirectly interfere in (or even neutralize) decisions taken at another level, e.g. an application requests more resources to keep its QoS while part of the infrastructure is being shutdown for energy reasons. Hence, it becomes necessary not only to establish a synergy between cloud layers but also to make these layers flexible and sensitive enough to be able to react to runtime changes and thereby fully benefit from that synergy. This thesis proposes a self-adaptation approach that considers both application internals (architectural elasticity) and infrastructure (resource elasticity) to reduce the energy footprint in cloud infrastructures. Each application and the infrastructure are equipped with their own autonomic manager, which allows them to autonomously optimize their execution. In order to get several autonomic managers working together, we propose an autonomic model for coordination and synchronization of multiple autonomic managers. The approach is experimentally validated through two studies: a qualitative (QoS improvements and energy gains) and a quantitative one (scalability).