Ayesha reported,

I asked, "Did the Messenger of Allah ﷺ perform the ritual bath at the beginning of the night or at the end of it?"She replied, "He did both. Sometimes he bathed at the beginning of the night, and sometimes he bathed at the end of it."I said, "Praise be to Allah, who has placed flexibility in this matter."

Nasai 224

Sahih

أخبرنا يحيى بن حبيب بن عربي قال حدثنا حماد عن برد عن عبادة بن نسي عن غضيف بن الحارث قال دخلت على

عائشة رضي الله عنها فسألتها قلت

أكان رسول الله ﷺ يغتسل من أول الليل أو من آخره قالت كل ذلك ربما اغتسل من أوله وربما اغتسل من آخره قلت الحمد لله الذي جعل في الأمر سعة

النسائي 224صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Purification
Chapter
Bathing at the beginning of the night and its end
Numbering
Darussalam 224
Nasai 224