The Messenger of Allah ﷺ said, "Children of Abd Manaf, if you are ever entrusted with this affair, do not prevent anyone from circling this House and praying at any hour they wish, whether by night or by day."
أن رسول الله ﷺ قال: يا بني عبد مناف، إن وليتم هذا الأمر فلا تمنعوا أحدا طاف بهذا البيت وصلى أي ساعة شاء ليل أو نهار.
Reported by Tahawi in Sharh Maani al-Athar (3782), and Tabarani in Al-Kabir (11/160), both through the route of Muhammad bin Abdul-Malik bin Abu Shawarib, who said, Hassan bin Ibrahim narrated to us (he is Ibn Abdullah Kirmani), from Ibrahim bin Yazid bin Mardanbah the goldsmith, from Ataa, from Ibn Abbas, who related it.Its chain of transmission is hasan on account of Hassan bin Ibrahim Kirmani, for there is disagreement about him, though his hadith is hasan when he does not err.What is meant by "prayer" here is the two units of prayer for tawaf, and voluntary prayer in general, according to the most sound of the sayings of the people of knowledge, due to the nobility of its place and in order to attain its merit. The general prohibition against prayers at the disliked times is subject to the specification made by this hadith. This is the view of the majority of the people of knowledge, among them Shafii, Ahmad, Abu Thawr, and the scholars of hadith generally, as well as Tahawi from the Hanafis.As for the obligatory prayers, there is no disagreement among the people of knowledge that it is not permissible to perform them outside their appointed times, due to the words of the Most High, "Indeed, prayer has been decreed upon the believers at fixed times" [Nisa 4:103].