We propose a method to obtain the resonance frequencies of coupled optical modes for a stack of two periodically corrugated slabs. The method is based on the modes in each slab, which are derived by the Fourier modal method in combination with the optical scattering matrix theory. We then use the resonant mode approximation of the scattering matrices to develop a linear eigenvalue problem with dimensions equal to the number of resonant modes. Its solutions are the resonance frequencies of the coupled system and exhibit a good agreement with exact solutions. We demonstrate the capabilities of this method for pairs of planar waveguides and gratings of one-dimensional wires.