In regards to sleeping in the last ten nights, then there is the Hadith:
عَنْ عَائِشَةَ ـ رضى الله عنها ـ قَالَتْ كَانَ النَّبِيُّ صلى الله عليه وسلم إِذَا دَخَلَ الْعَشْرُ شَدَّ مِئْزَرَهُ، وَأَحْيَا لَيْلَهُ، وَأَيْقَظَ أَهْلَهُ
Aisha (may Allah be pleased with her) said: If the Prophet (ﷺ) entered into the last ten nights, he would tighten his waist belt, stay up the night, and awaken his family
[Bukhari and Muslim]
Some of the Scholars understood it to mean that the Prophet (ﷺ) stayed up the entire night without sleeping, whereas others understood he stood up most of the night.
Hafidh Ibn Rajab (may Allah have mercy upon him) said:
“The Prophet (ﷺ) used to specify the ten nights of Ramadan with actions which he did not do in the remaining of the month. From them (was) staying up the night. It is carried to mean that he stayed up the whole night. It was reported from Aisha (may Allah be pleased with her) in a narration which is weak with the wording:
“and he stood up the whole night”.
In the Musnad with another version from her where she said: “The Prophet (ﷺ) used to mix the twenty [days of Ramadan] between prayer and sleep. If it was the last ten nights, he would strive and tighten his Izar [Reported in Musnad Ahmad (no. 24612) with a weak chain].
Hafidh Abu Na’eem reported with a chain which has weakness from Anas (may Allah be pleased with him) who said: If the Prophet (ﷺ) witnessed Ramadan, he would pray and sleep. If it was the twenty-fourth day, he did not taste a wink [of sleep]” [Reported by Abu Nu’aym in al-Hilyah (6/306) with a weak chain].
It is also carried to mean that he stood up most of the night.
It was reported from someone of the earlier people from Bani Haashim. The narrator Abu Ja’far Muhammad bin Ali thought it meant he stood up half of the night. He said: whoever stays up half the night, he stayed up the whole night. Something similar to this has preceded
from Aisha (may Allah be pleased with her) that the Prophet (ﷺ) fasted the whole month of Sha’ban. He fasted it except a little [Saheeh].
It is supported by what is reported in Saheeh Muslim from ‘Aisha (may Allah be pleased with her) who said: “I do not know that the Prophet (ﷺ) stood up the entire night until morning [Saheeh Muslim no. 746]”
[Lataaif al-Ma’aarif (pg. 263)]
Some of our contemporary Scholars hold the view that its better and legislated to stay up the whole night.
Shaikh Bin Baz (may Allah have mercy upon him) mentioned that here.
Also, Shaikh Ibn ul-‘Uthaymeen (may Allah have mercy upon him) said similar as in his explanation of Bulugh al-Maram entitled Fath Dhil Jalali wal-Ikram (3/293) and also Sharh Riyaadus-Saliheen (2/75).
So it is better to stay up the entire night. But if one wants to sleep a little to gain strength and then stay up the rest of the night, then it is fine as Shaikh Bin Baz (may Allah have mercy upon him) mentioned in the above link.
Majid Jawed Al-Afghanee