Can one consider the gravitational field of a gravitating body such as a planet or a star as a potential well for gravitational waves? In other words, would it be possible for such a gravitating body to capture gravitational waves in some bound state, similar to the way electrons exist in bound states around the nucleus in atoms or to the way light can be captured in resonant cavities?
We generally calculate the motion of gravitational waves using an approximation called linearised gravity. With this approach gravitational waves behave just like light does so it can't be bound in a gravitational potential well any more than light can.
Just like light, gravitational waves cannot escape from behind an event horizon, and they could in principle be captured in a circular orbit (called the photon sphere) though this orbit is unstable. But neither of these really count as a bound state.
When you say light can be captured in resonant cavities I'd guess you're thinking of waveguides. These work because EM waves interact very strongly with the conduction electrons in the metal, but gravitational waves interact so weakly with matter that a gravitational waveguide isn't possible.
The linearised gravity approximation I mentioned above ignores the gravitational field produced by the energy of the waves themselves. If instead we use a full calculation it has been suggested that sufficiently intense gravitational waves can form a bound state called a geon. It has been proven that such states can exist but it is currently unknown if they are stable.