Sahih Muslim | Book 15 | Hadith Number 4072

Narrated by Ibn 'Umar
Ibn 'Umar reported that Umar (b. Khattab) said: Messenger of Allah, I had taken a vow during the days of Ignorance (Jahiliyya) that I would observe I'tikaf for a night in the Sacred Mosque. He (the Holy Prophet) said: Fulfil your vow.