All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is permissible for a Muslim to stay awake all night long until the time of Fajr prayer. However, it should not be done unless there is a certain benefit. It is disliked to stay up at night except for a valid reason such as seeking knowledge, worship, conducting the affairs of Muslims, talking with one's family, or entertaining guests. Abu Barzah Al-Aslami reported that the Prophet, sallallaahu ‘alayhi wa sallam, disliked sleeping before ‘Ishaa' prayer and engaging in conversation after it. [Al-Bukhari and Muslim]
Al-Haafith Ibn Hajar commented on the Hadeeth saying, "The undesirableness of staying up for idle conversation after 'Ishaa' was reported on the authority of ‘Umar, Huthayfah, ‘Aa'ishah, and others. Some of them explained the rationale behind that, underlining that he, sallallaahu ‘alayhi wa sallam, disliked it because it may be the reason for not performing Qiyaam (voluntary night prayers). That rationale was reported from ‘Umar . Others stated that the reason was that the Prophet, sallallaahu ‘alayhi wa sallam, wanted one's day to be concluded with performing prayer; he, sallallaahu ‘alayhi wa sallam, liked performing the ‘Ishaa' prayer and going to bed right afterwards so that the remembrance of Allaah would be the last activity right before going to sleep instead of engaging in idle talk. It was reported that ‘Umar ibn ‘Abdul-‘Azeez used to engage in conversation after ‘Ishaa' prayer only before he performed Witr prayer. He concluded his day by performing Witr prayer instead of concluding it with ‘Ishaa' prayer. ‘Aa'ishah used to advise those who engage in conversation after ‘Ishaa' prayer, "Let the angels recording your deeds have some rest!"
If staying up late is for engaging in idle, obscene, abusive talk, then it is, without doubt, disliked." [Fat-h Al-Baari]
Allaah Knows best.