When they awoke, Jon found the answer to their problems.
Jon found the answer to their problems when they woke up.