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 (EPWs) with trapped particles, such as Bernstein-Greene-Kruskal modes. 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 EPWs is discussed for illustration purposes.