According to Islamic traditions, the first Muslims, at the commencement of the FASTING, were permitted to eat and drink only a little while before going to their night sleep. If someone who had fasted the whole day slept during the sunset and then woke up, he was not permitted to eat and drink any thing, and had to continue his fast. Also, sexual intercourse was declared unlawful during the whole month. (RAMAZAN)
Such rules and regulations were hard to endure with, and some failed to observe them, and in particular the young Muslims were not able of self-control in sexual relations. Allah pardoned them and alleviated their boredom by revealing the verse No. 187.