One of the key elements in the migration of power systems towards the smart grid paradigm is the increasing diffusion of new flexible loads, such as electric vehicles and “smart” appliances. It has become crucial to properly coordinate these new entities, ensuring safe and reliable system operation and, at the same time, aligning the interest of private customers with the overall social welfare. This talk presents novel distributed control strategies to achieve these objectives. On the basis of an aggregative game formulation that considers the loads as rational competing agents, Lyapunov stability tools are used to ensure convergence and optimality of the proposed control schemes, which are based on iterative better-response updates. The state of the art is advanced by extending these results to more general modelling frameworks, explicitly accounting for grid topology, partial efficiency of the loads, state constraints and dynamic environments.