In this paper we describe how relativistic attosecond electron pulses could be produced in free space by ultrafast and ultraintense transverse magnetic (TM) laser beams. Numerical solutions of the time-dependent three-dimensional Maxwell-Lorentz equations reveal that electrons initially at rest at the waist of a multi-TW pulsed TM01 laser beam can be accelerated to multi-MeV energies. The use of a few-cycle laser beam and a compact initial electron cloud forces the particles to effectively interact with a single half-cycle of the laser field and form a pulse of attosecond duration.