but he did not go out to them. When morning came he said, “I saw what you did, and nothing kept me from coming out to you except my fear that it might be made obligatory for you.” This occurred in Ramadan. His Companions continued the practice after him, and the whole ummah welcomed it. He also said, “Whoever stands in prayer with the imam until the imam departs will have the reward of spending the entire night in prayer,” and, “Whoever spends the nights of Ramadan in prayer out of faith and seeking reward will have his past sins forgiven”—agreed upon.
Thus, it is an established sunnah that a Muslim should not neglect.
As for the number of its rakʿahs, nothing definitive has been authentically reported from the Prophet, and the matter is broad in scope.
Shaykh al-Islam Ibn Taymiyyah (d. 728 AH) said, “He may pray twenty rakʿahs, as is the well-known view of Ahmad and al-Shafiʿi, and he may pray six…"