Magnesium gradients in elliptical galaxies. III. Results and interpretation