We recover the energy in a maglev flywheel in the same way we almost always convert mechanical energy to electrical energy: with a 3 phase electric power generator/motor, also called an alternator, with the rotor on the same shaft or otherwise integrated with the flywheel.
In cars with a combined starter/generator, pumped-storage hydroelectric dams, maglev flywheels, etc.,
3-phase electric power goes into the coils of the stator, and gets converted to mechanical torque to spin the rotor.
Later, the mechanical energy of the same spinning rotor pushes a magnetic field around that pushes electrons through those same coils of the stator, converting mechanical energy to electrical energy that exits out the wires of the generator.
Such 3-phase motor/generator electric machines don't need anything to touch the rotor.
(Unlike some DC motors/generators that require a "brush" to touch the rotor).
In practice, most of them do have something that touches the rotor --
a long input shaft to carry mechanical energy into the generator, a long output shaft to carry mechanical energy out of the generator, various bearings to keep the rotor more or less centered end-to-end and radially, or some combination.
What makes magnetic levitated flywheel energy storage a little special is that nothing actually does touch the rotor.
Some of the coils surrounding the rotor act like the coils of a 3 phase electric machines.
Those coils convert electric energy to mechanical energy to spin up the rotor in motor mode.
The same coils later convert the mechanical energy of the rotor back to electrical energy, slowing down the rotor in generator mode.
Other coils surrounding the rotor are used as a magnetic bearing to levitate the flywheel.
A typical regenerative variable-frequency drive typically uses 6 IGBTs to convert DC electric power to mechanical energy and back; the IGBT arrangement used in maglev flywheels is no different.