All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
It is not a condition for the validity of spending the night in Mina and Muzdalifah to sleep there or get out of the bus. However, the pilgrim is obliged to stay there most of the night, whether or not he sleeps and whether he is on the ground or on the bus. Furthermore, it is permissible for women and weak persons to start moving on from these locations after midnight.
As regards your Tawaaf (circumambulation around the Ka’bah) for ‘Umrah (lesser pilgrimage) and Tawaaf Al-Ifaadhah (Hajj circumambulation) without being in a state of purity after you had the discharges, then what you should have done – when you felt that you had discharges – is to stop and renew your ablution and then make the Tawaaf again.
Since this already happened, we hope that your Tawaaf is correct because the condition of being in a state ablution for Tawaaf is a controversial issue among the scholars . Most of them are of the view that it is a condition to have ablution for Tawaaf while some of them – among whom is Ibn Taymiyyah – are of the view that ablution is not a condition for Tawaaf because the Prophet did not order it [ablution] and the fact that he performed Tawaaf in a state of ablution does not necessarily mean that it is an obligation to do so and there is no clear evidence that ablution is a condition for Tawaaf. Shaykh Ibn ‘Uthaymeen considered this to be the preponderant opinion and explained the prophetic narration which reads: "Performing Tawaaf around the House of Allaah is just like performing the prayer," to mean that it has the same ruling like the prayer in regard to humbleness, mentioning of Allaah and the like, and not in regard to purity, facing the direction of Qiblah (the Ka’bah) and so forth.
Since this is a very controversial issue, it is not possible for us to rule that a great act of worship, like Hajj, is invalid without considering the other opinions which state otherwise.
In addition to the above, you are not very sure that the discharge you had was during Tawaaf; you may well have had it – if at all –after the Tawaaf. Many scholars stated that a discharge of this kind – if the time of discharge is not confirmed – should be considered as if it came out at the end of the time of the act of worship, because in principle these discharges do not come out in normal situations. It is only when there is certainty about such discharges and the time they came out that one may drift from the principle.
To conclude, there is no need to worry and have whispers about this and your Hajj is correct, if Allaah wills.
Allaah Knows best.