Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:51:17

They used to sleep but little of the night,  

Little of the night did they use to sleep (mā is extra; yahja‘ūna is the predicate of kānū; qalīlan, ‘little’, is an adverb), in other words, they used to sleep for a small portion of the night and perform prayers during most of it,
القرآن:٥١:١٧

كَانُوا قَلِيلًا مِنَ اللَّيْلِ مَا يَهْجَعُونَ  

{كانوا قليلا من الليل ما يهجعون} ينامون، وما زائدة ويهجعون خبر كان وقليلا ظرف، أي ينامون في زمن يسير من الليل ويصلون أكثره.