It was narrated from Ibn 'Umar that the Messenger of Allah(ﷺ) said:
"If anyone of you knew what is wrong with being alone, no one would travel at night by himself."