A first-principle variational approach to adiabatic collisionless plasma waves is described. The focus is made on one-dimensional electrostatic oscillations, including phase-mixed electron plasma waves (EPW) with trapped particles, such as Bernstein-Greene-Kruskal modes. The well known Whitham's theory is extended by an explicit calculation of the EPW Lagrangian, which is related to the oscillation-center energies of individual particles in a periodic field, and those are found by a quadrature. Some paradigmatic physics of EPW is discussed for illustration purposes.