It is shown that s.a.w. gratings on the surface of an isotropic medium may support modes that are confined underneath the grating. The 3-dimensional resonant-mode patterns are derived for the Rayleigh wave in a high-Q-factor resonator consisting of two gratings separated by Λ/2, where Λ is the grating periodicity, in the limit when the grating width is large compared with a wavelength. The resonance frequencies of the different modes are presented.