Mueller matrix spectroscopic ellipsometry becomes increasingly important for determining structural parameters of periodic line gratings. Because of the anisotropic character of gratings, the measured Mueller matrix elements are highly azimuthal angle dependent. Measurement results are interpreted by basic principles of diffraction on gratings. The spectral and azimuthal angle dependent intensity changes are correlated to so-called Rayleigh singularities, i.e., wavelengths where the number of diffraction orders changes. The positions of the Rayleigh singularities are calculated analytically and overlapped with measured spectra of two different types of photomasks with transparent and reflecting substrates. For both types of gratings, the Rayleigh singularities reproduce the contours of the spectra. Increasing grating periods result in a shift of these contours to longer wavelengths. Characteristic differences between the two photomasks are explained by the influence of the transmission orders, which are determined by the substrate transparency.