Light-electron interaction in empty space is the seminal ingredient for free-electron lasers and also for controlling electron beams to dynamically investigate materials and molecules. Pushing the coherent control of free electrons by light to unexplored timescales, below the attosecond, would enable unprecedented applications in light-assisted electron quantum circuits and diagnostics at extremely small timescales, such as those governing intramolecular electronic motion and nuclear phenomena. We experimentally demonstrate attosecond coherent manipulation of the electron wave function in a transmission electron microscope, and show that it can be pushed down to the zeptosecond regime with existing technology. We make a relativistic pulsed electron beam interact in free space with an appropriately synthesized semi-infinite light field generated by two femtosecond laser pulses reflected at the surface of a mirror and delayed by fractions of the optical cycle. The amplitude and phase of the resulting coherent oscillations of the electron states in energymomentum space are mapped via momentum-resolved ultrafast electron energy-loss spectroscopy. The experimental results are in full agreement with our theoretical framework for light-electron interaction, which predicts access to the zeptosecond timescale by combining semi-infinite X-ray fields with free electrons.