Because of this, he decided not to sleep at all during that night. He stayed awake until the morning.
People asked him why he did this, and he said,
"My nafs (ego, desire) defeated me and was able to stop me from praying, so I defeated its desire for sleep by staying up the whole night. And by Allah, I’m still treating my nafs like that, until it submits to Allah (swt) and starts to love worshiping Him."
-From Adaabul Hasan Al-Basri by Imam Jamaladdin Ibn Al-Jawzi.