Chaos is a phenomenon that occurs in many aspects of contemporary science. In classical dynamics, chaos is defined as a hypersensitivity to initial conditions. The presence of chaos is often unwanted, as it introduces unpredictability, which makes it difficult to predict or explain experimental results. Conversely, we demonstrate here how chaos can be used to enhance the ability of an optical resonator to store energy. We combine analytic theory with ab-initio simulations and experiments in photonic crystal resonators to show that a chaotic resonator can store six times more energy than its classical counterpart of the same volume. We explain the observed increase with the equipartition of energy among all degrees of freedom of the chaotic resonator, i.e. the cavity modes, which is evident from the convergence of their lifetime towards a single value. A compelling illustration of the theory is provided by demonstrating enhanced absorption in deformed polystyrene microspheres.