It was as much a Deus Ex Machina ending as Q's actions at the end of "Q Who" were. That also had another abrupt ending, but it was something that everyone could see coming.
different scenario. Q CREATED the crisis in "Q Who," he was just fixing his own mess.
The Prophets didn't start the Dominion War, nor did they cause the occupation of DS9. They were fixing the Federation's mess there.