We were with the Messenger of Allah ﷺ on a military expedition. When we arrived back at Medina, we set out to enter the city, but he said, "Hold off, so that we enter at night (meaning after the evening prayer), giving the disheveled wife time to comb her hair and the wife whose husband has been absent time to groom herself."
كنا مع رسول الله ﷺ في غزاة، فلما قدمنا المدينة ذهبنا لندخل، فقال: أمهلوا حتى ندخل ليلا (أي عشاء) كي تمتشط الشعثة، وتستحد المغيبة.
Bukhari narrated it in the Book of Marriage (5079), and Muslim in the Book of Leadership (1928:181), both of them through the route of Hushaym, who said, Sayyar narrated to us, from Shaybi, from Jabir, and he related it, and the wording given here is Muslim's.In another version with Bukhari (5244), "When one of you has been away for a long time, he should not come knocking on his family's door at night."And in another version with Abu Dawud (2777), from a different route, from Mughira, from Shaybi, "The best time for a man to come to his family when he arrives from a journey is at the beginning of the night."