Although we are allowed to go out after maghrib for beneficial matters, the Prophet (peace be upon him) discouraged us from hanging out after 'isha or engaging in unnecessary talks. Abu Barzah reports that the Prophet discouraged us from sleeping before 'isha as well as conversing after 'isha. Thus, as pointed out by scholars, to indulge in unnecessary speech or idle chats after 'isha is considered undesirable.
If that is the case, how can we say that men are allowed to hang out and idle their time until 1 or 2 am? According to authentic scholars, the Prophet discouraged this practice for two obvious reasons: By going to bed immediately after 'isha, we retire in a state of purification and dhikr. By engaging in frivolous speech after having done so is undesirable, if not entirely forbidden. It was for this reason that we read that it was customary with scholars of the salaf that they would perform two rak'ahs before retiring to bed, in case they engaged in conversations after 'isha.
The second reason, which seems to be even more crucial than the first one: By hanging out after 'isha, one may end up missing the fajr prayer, let alone tahajjud prior to it. How can a conscientious Muslim afford to miss his fajr after having known the Prophet's emphatic statement, 'the two rakahs of fajr are far more valuable than this world and all that it contains'?" The above hadith has been reported by Imam Muslim and Tirmidhi on the authority of 'Aishah, may Allah be pleased with her.