How Was Prayer Enjoined?
Question

I have heard that during the early years of Islam, Muslims were told to perform 40 prayers a day, but this was cut down by 5 each time Allah (the Almighty) knew this was unachievable by the majority of Muslims until there were only 5 prayers a day left. Is this because Allah (the Almighty) has shown us mercy?
Praise be to Allah.What you have heard about the prayer is not correct. The correct version is that Allah initially – on the night of the Mi’raj when our Prophet (peace and blessings of Allah be upon him) was taken up into heaven – enjoined fifty prayers to be performed night and day . Then the Prophet (peace and blessings of Allah be upon him) kept asking his Lord to reduce it until it became five prayers to be offered night and day. But Allah decreed the reward of fifty prayers for these five, so whoever prays five prayers will receive the reward of fifty prayers. 
Anas ibn Maalik (may Allah be pleased with him) said: Abu Dharr narrated that the Messenger of Allah (peace and blessings of Allah be upon him) said: “The roof of my house was split open when I was in Makkah, and Jibril (peace and blessings of Allah be upon him) came down and split open my chest and washed it with Zamzam water. Then he brought a golden vessel filled with wisdom and faith and poured it into my chest, then he sealed it. Then he took me by the hand and ascended with me into the lowest heaven. When I reached the lowest heaven Jibril said to the gatekeeper, ‘Open up!’ He said, ‘Who is this?’ He said, ‘Jibril.’ He said, ‘Is there anyone with you?’ He said, ‘Yes, Muhammad (peace and blessings of Allah be upon him) is with me.’ He said, ‘Has his mission begun?’ He said, ‘Yes.’ And when it was opened we went up into the lowest heaven… Then Allah enjoined upon my Ummah fifty prayers, and I came back until I passed by Musa who said, ‘What has Allah enjoined upon your Ummah?’ I said, ‘He has enjoined fifty prayers.’ He said, ‘Go back to your Lord, for your Ummah will not be able to bear that.’ So I went back and He reduced it. Then I came back to Musa and said, ‘He has reduced it.’ He said, ‘Go back to your Lord, for your Ummah will not be able to bear that.’ So I went back and He reduced it further. Then I came back to Musa and said, ‘He has reduced it further.’ He said, ‘Go back to your Lord, for your Ummah will not be able to bear that.’ So I went back and He said, ‘(The prayers) are five but (the reward) is fifty. The Sentence that comes from Me cannot be changed [Quran 50:29].’ Then I went back to Musa and he said, ‘Go back to your Lord.’ But I said, ‘I feel shy before my Lord.’…” (Narrated by Al-Bukhaari, 342 and Muslim, 163) 
Ibn Hajar (may Allah have mercy on him) said: “What is meant is that they are five with regard to what is to be done, but they are fifty with regard to the reward .” (Fath Al-Bari, 1/463) 
And Allah knows best.