From Sahih Muslim (Hadith 1510):
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
Reference: Muslim 1510