As for reciting the Qur’aan outside of the prayer, it is better to read from the Mushaf, because it is better from the view precision and memorization, except when reciting it from the heart is more conducive to memorizing it and makes it easier to concentrate. In this case one should recite it from the heart.
In the case of the prayer, it is better to recite from the heart. This is because when one recites from the Mushaf it results in unnecessary motion from holding the Mushaf, turning the pages, and looking at letters. All of this causes one to be unable to properly place the right hand over the left on the chest while in the standing position, and it may also result in harsh treatment to it during the bowing and prostration positions when he has to put the Mushaf under his arm, etc. it is for these such reasons that we prefer a person to recite from his heart during prayer rather than from the Mushaf.
We even see some people, when they are praying behind an Imaam, reading directly from the Mushaf , following his recitation. Because of the reasons mentioned above, and because the worshipper needs only to follow the Imaam, people should not hold the Mushaf when they are praying.
But if the case is that the Imaam’s memory is not good, and he says to one of the followers, “While you are praying behind me follow along in the Mushaf in case I make a mistake.” Then there is no harm in this.