Abstract The Landau states of electrons with orbital angular momentum in magnetic fields are important in the quantum theories of metals and of synchrotron radiation at storage rings, in relativistic astrophysics of neutron stars, and in many other areas. In realistic scenarios, electrons are often born inside the field or injected from a field-free region, requiring nonstationary quantum states to account for boundary or initial conditions. This study presents nonstationary Laguerre–Gaussian (NSLG) states in a longitudinal magnetic field, characterizing vortex electrons after their transfer from vacuum to the field. Comparisons with Landau states and calculations of observables such as mean energy and root-mean-square (r.m.s.) radius show that the r.m.s. radius of the electron packet in the NSLG state oscillates in time around a significantly larger value than that of the Landau state. This quantum effect of oscillations is due to boundary conditions and can potentially be observed in various problems, particularly when using magnetic lenses of electron microscopes and linear accelerators. Analogies are drawn between a quantum wave packet and a classical beam of many particles in phase space, including the calculation of mean emittance of the NSLG state as a measure of its quantum nature.