Praise be to Allah.
What they did is permissible and there is nothing wrong with it, because if it is permissible for a person to move on from Muzdalifah, it is permissible for him to do everything that follows that. So if they move on, for example, from Muzdalifah at the end of the night after the moon disappears, and they reach Mina, then they may stone the Jamrah and go down to Makkah to do tawaaf (circumambulate the Ka‘bah) and sa‘i (go between as-Safah and al-Marwah), and come back. And if they come back before sunrise, there is no problem with that, because it was only made permissible to move on (earlier) for those who are weak so that they would be able to do the rituals of Hajj before the crowds of people became very great. End quote.