Gravitational Jaynes–Cummings model beyond the rotating wave approximation