It is narrated from Sayyiduna Ali (may Allah be pleased with him) that "When the Messenger of Allah (peace and blessings be upon him) reached the morning at Badr, he (peace and blessings be upon him) had kept the whole of the preceding night alive (in the worship of Allah, that is, he spent it awake), even though he (peace and blessings be upon him) was travelling at the time." Imam Ibn Hibban has also recorded this report in his Sahih through Imam Abu Ya'la.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب سيرة سيدنا رسول الله صلى الله عليه وسلم / 4546