We report on the design, realization, and experimental investigation by spatially resolved monochromated electron energy loss spectroscopy (EELS) of high-quality-factor cavities with modal volumes smaller than λ3, with λ being the free-space wavelength of light. The cavities are based on a slot defect in a 2D photonic crystal slab made up of silicon. They are optimized for high coupling of electrons accelerated to 100 kV to quasi-transverse electrical modes polarized along the slot direction. We studied the cavities in two geometries and took advantage of the deep sub-optical wavelength spatial resolution of the electron microscope and high spectral resolution of the monochromator to comprehensively describe the optical excitations of the slab. The first geometry, for which the cavities have been designed, corresponds to an electron beam traveling along the slot direction. The second consists of the electron beam traveling perpendicular to the slab. In both cases, a large series of modes is identified. The dielectric slot mode energies are measured to be in the 0.8-0.85 eV range, as per design, and surrounded by two bands of dielectric and air modes of the photonic structure. The dielectric even slot modes, to which the cavity mode belongs, are highly coupled to the electrons with up to 3.2% probability of creating a slot photon per incident electron. Although the experimental spectral resolution (around 30 meV) alone does not allow to disentangle cavity photons from other slot photons, the excellent agreement between the experiments and finite-difference time-domain simulations allows us to deduce that among the photons created in the slot, around 30% are stored in the cavity mode. A systematic study of the energy and coupling strength as a function of the photonic band gap parameters permits us to foresee an increase of coupling strength by fine-tuning phase-matching. Our work demonstrates free electron coupling to high-quality-factor cavities with low mode densities and sub-λ3 modal volumes, making it an excellent candidate for applications such as quantum nano-optics with free electrons.