The elastic strains in regions near the top surface of strained-layer structures can be quite different from those in deeper portions of the samples. This effect has been established in epitaxial layers of ZnSe grown on GaAs and ZnSe-$\mathrm{Zn}{\mathrm{S}}_{x}{\mathrm{Se}}_{1\ensuremath{-}x}$ strained-layer superlattices. The depth dependence of the strains was determined with Raman scattering measurements performed under laser excitation below and above the band gap. The strain values near the top surface are driven by a stronger relaxation of the in-plane lattice constants towards equilibrium. This relaxation appears to be independent of the generation of misfit dislocations.