Ghudayf bin al-Harith (may Allah be pleased with him) said: I said to Sayyidah Aishah (may Allah be pleased with her): Tell me, did the Messenger of Allah (peace and blessings be upon him) perform the ritual bath for janabah at the beginning of the night or at the end of it? She said: Sometimes he (peace and blessings be upon him) did it in the early part of the night, and sometimes in the last part of the night. I said: 'Allahu akbar' (Allah is the Greatest); all praise belongs to the One who has made room in the matter.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 963