In recent years, several optimal dynamos have been discovered. They minimize the magnetic energy dissipation or, equivalently, maximize the growth rate at a fixed magnetic Reynolds number. In the optimal dynamo of Willis (2012, Phys. Rev. Lett. 109, 251101), we find mean-field dynamo action for planar averages. One component of the magnetic field grows exponentially while the other decays in an oscillatory fashion near onset. This behavior is different from that of an alpha^2 dynamo, where the two non-vanishing components of the planar averages are coupled and have the same growth rate. For the Willis dynamo, we find that the mean field is excited by a negative turbulent magnetic diffusivity, which has a non-uniform spatial profile near onset. The temporal oscillations in the decaying component are caused by the corresponding component of the diffusivity tensor being complex when the mean field is decaying and, in this way, time-dependent. The growing mean field can be modeled by a negative magnetic diffusivity combined with a positive magnetic hyperdiffusivity. In two other classes of optimal dynamos of Chen et al. (2015, J. Fluid Mech. 783, 23), we find, to some extent, similar mean-field dynamo actions. When the magnetic boundary conditions are mixed, the two components of the planar averaged field grow at different rates when the dynamo is 15% supercritical. When the mean magnetic field satisfies homogeneous boundary conditions (where the magnetic field is tangential to the boundary), mean-field dynamo action is found for one-dimensional averages, but not for planar averages. Despite having different spatial profiles, both dynamos show negative turbulent magnetic diffusivities. Our finding suggests negative turbulent magnetic diffusivities may support a broader class of dynamos than previously thought, including these three optimal dynamos., Comment: 23 pages, 15 figures, 2 tables, submitted to J. Plasma Phys