O ye who believe! Fasting is prescribed to you as it was prescribed to those before you, that ye may (learn) self-restraint. Qur'an (2:183)
Hadith
Narrated Aisha: With the start of the last ten days of Ramadan, the Prophet used to tighten his waist belt (i.e. work hard) and used to pray all the night, and used to keep his family awake for the prayers.[Bukhari]