I asked Ayesha, "Did the Messenger of Allah ﷺ perform the ritual bath for major impurity at the beginning of the night or at the end of it?"She replied, "Sometimes he bathed at the beginning of the night, and sometimes he bathed at the end of it."I said, "Allah is the greatest. Praise be to Allah, who has made the matter accommodating."I asked, "Did the Messenger of Allah ﷺ pray witr at the beginning of the night or at the end of it?"She replied, "Sometimes he prayed witr at the beginning of the night, and sometimes he prayed it at the end."I said, "Allah is the greatest. Praise be to Allah, who has made the matter accommodating."
قلت لعائشة: أرأيت رسول الله ﷺ يغتسل من الجنابة في أول الليل أو في آخره؟ قالت: ربما اغتسل في أول الليل، وربما اغتسل في آخره، قلت: الله أكبر الحمد لله الذي جعل في الأمر سعة، قلت: أرأيت رسول الله ﷺ كان يوتر أول الليل أم في آخره؟ قالت: ربما أوتر في أول الليل، وربما أوتر في آخره. قلت: الله أكبر الحمد لله الذي جعل في الأمر سعة.
Abu Dawud (1/152–153) (226) reported it, and this is his wording, and Nasai (1/125) (222, 223) reported it as well, but limited to the first part. Both narrated it through the route of Ubada bin Nusayy, from Ghudayf bin Harith, who then mentioned the hadith. This hadith has already been discussed in the Book of ghusl, in the chapter on a person in a state of major impurity delaying ghusl.Ibn Khuzayma (1081) also reported it through another route, from Muawiya bin Salih, that Abdullah bin Abu Qays told him that he asked Ayesha how the Messenger of Allah ﷺ used to perform witr, at the end of the night or at its beginning. She said, "He did both. Sometimes he performed witr at the beginning of the night, and sometimes at its end." So I said, "Praise be to Allah, who has made this matter one of latitude."