Since the Q can travel in time, then they may already be prepared.
Can they really travel in time? I know Q said he could do it and said things like "this isn't a trick, this is real" but it is possible that he simply lied and every so-called time travel Q did was nothing but an elaborate illusion, something like the Q version of the holodeck. What have we seen them do, they can teleport, travel through space, change the shapes of objects and beings etc., that's not that different from the things the federation can do just on a much larger scale and obviously much more advanced.
When Q talked about changing the gravitational constant of the universe that doesn't necessarily mean changing the constant in the entire universe just locally to move the moon. Changing the laws of physics locally is something the federation does every time they use warp drive, it doesn't affect everything everywhere, just the ship inside the warp field that can suddenly exceed the speed of light, something that isn't possible in our universe.
Have we ever seen Q do something that's not just something humans can do just on a larger scale and with less obvious technology? Picard did appear almost Q-like to the Mintakans, Ardra pulled it almost off in Devil's Due. For all we know the Q could just be a hundred years more advanced than the federation and the entire time the Q laughed their asses off that they managed to dupe the humans into thinking they're some super powerful god-like beings.