"The word tahajjud is derived from hujud which means sleep and tahajjud literally signifies the giving up of sleep. The Tahajjud worship is so called because it is offered after one has had some sleep, and sleep is then given up for the sake of worship. It is a midnight worship, which is stated in the Koran to be voluntary: "O thou who hast wrapped up thyself! Rise to pray in the night except a little, half of it, or lessen it a little or add to it, and recite the Koran well arranged.....Surely the rising by night is the firmest way to tread and most impressive in speech" (73:1-6), "Surely they Lord knows that thou passest in prayer nearly two-thirds of the night, and (sometimes) half of it, and (sometimes) a third of it, and also a party of those with thee" (73:20), and "And during a part of the night, forsake sleep by it, beyond what is incumbent on thee; may be thy Lord will raise thee to a position of great glory" (17:79).
As the above quotation from the 73rd chapter shows, the Prophet used to pass half or even two-thirds of the night in worship. His practice was to go to sleep immediately, and then he generally woke up after midnight and passed almost all this latter half of the night in remembrance of God, sometimes taking a short nap, which would give him a little rest, just before the morning prayer. This practice he kept up to the last
Ghazalli quotes the Prophet as saying in his Ihya Ulum al-Din (London, 1983, pp. 123-4 and 129)) that, "It is incumbent upon you to observe night vigil, for it was the practice of your righteous predecessors. Night vigil bring us close to God, Great and Glorious is He, atones for our sins, drives disease from the body and puts a stop to transgression" and "Whenever a man is overtaken by sleep while performing prayer at night, the reward for his prayer is recorded in his favour and his sleep is reckoned as alms", and also "The best prayer after the prescribed is the night vigil". The Prophet said, "The honour of a believer lies in his vigilance at night and his esteem lies in his autonomy from people" (Bihar al-Anwar, 77:20). Ali bin Abu Talib said, "He who sleeps too much at night, will lose something of his deeds, which he cannot gain during the daytime" (Qurar al-Hikam, p. 289). Imam Jafar Sadik also said that in a revelation told Moses, "O you son of Imran! Those who only claim that they love Me, tell a lie, for when the night falls they neglect Me" (Bihar al-Anwar, 13:329). Imam Jafar Sadik further said, "Do not miss midnight worship because, in fact, the real loser is he who misses the midnight worship" (Ibid., 83:127).