We develop a rigorous quantum mechanical theory for collisions of polyatomic molecular radicals with S-state atoms in the presence of an external magnetic field. The theory is based on a fully uncoupled space-fixed basis set representation of the multichannel scattering wavefunction. Explicit expressions are presented for the matrix elements of the scattering Hamiltonian for spin-1/2 and spin-1 polyatomic molecular radicals interacting with structureless targets. The theory is applied to calculate the cross sections and thermal rate constants for spin relaxation in low-temperature collisions of the prototypical organic molecule methylene [CH2(X)] with He atoms. To this end, two highly accurate three-dimensional potential energy surfaces (PESs) of the He-CH2(X) complex are developed using the state-of-the-art CCSD(T) method and large basis sets. Both PESs exhibit shallow minima and are weakly anisotropic. Our calculations show that spin relaxation in collisions of CH2, CHD, and CD2 molecules with He atoms occurs at a much slower rate than elastic scattering over a large range of temperatures (1 uK -- 1 K) and magnetic fields (0.01 - 1 T), suggesting excellent prospects for cryogenic helium buffer-gas cooling of ground-state ortho-CH2(X) molecules in a magnetic trap. Furthermore, we find that ortho-CH2 undergoes collision-induced spin relaxation much more slowly than para-CH2, which indicates that magnetic trapping can be used to separate nuclear spin isomers of open-shell polyatomic molecules.