It is narrated from Sayyiduna Abu Sa'id Al-Khudri (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The whole earth is a place for prayer except for the bathhouse and the graveyard."
Hadith Referenceالسنن المأثورة / باب ما جاء في فضل النبي ﷺ والصلاة عليه / 176
Hadith Takhrijسنن ابی داؤد، الصلاة، باب المواضع التي لا تجوز فيها الصلاة، رقم : 492 وقال الالبانی صحیح ، سنن ترمذى، الصلاة، باب ماجاء أن الارض كلها مسجد رقم : 317 وصححه ابن خزيمة، رقم : 791 والحاكم : 251/1 ۔