Sahih Muslim, Book 5, Hadith 343 (Muslim 1496)

Abu Huraira reported the Messenger of Allah (ﷺ) as saying:

Everyone among you is constantly in prayer so long as the prayer detains him (for this noble objective) and nothing prevents him to return to his family but the prayer.