The spin-relaxation time for electrons in the impurity band of semiconductors with wurtzite crystal structure is determined. The effective Dresselhaus spin-orbit interaction Hamiltonian is taken as the source of the spin relaxation at low temperature and for doping densities corresponding to the metallic side of the metal-insulator transition. The spin-flip hopping matrix elements between impurity states are calculated and used to set up a tight-binding Hamiltonian that incorporates the symmetries of wurtzite semiconductors. The spin-relaxation time is obtained from a semiclassical model of spin diffusion, as well as from a microscopic self-consistent diagrammatic theory of spin and charge diffusion in doped semiconductors. Estimates are provided for particularly important materials. The theoretical spin-relaxation times compare favorably with the corresponding low-temperature measurements in GaN and ZnO. For InN and AlN, we predict that tuning of the spin-orbit coupling constant induced by an external potential leads to a potentially dramatic increase of the spin-relaxation time related to the mechanism under study.