In du‘aa’ al- istikhaarah it is not essential to recite it by heart; if one reads it from a piece of paper, that is acceptable, because what matters here is the du‘aa’, and (the one who reads it from a piece of paper) has said it. The majority of scholars regard it as permissible to read Qur’aan from the Mushaf when praying, which is more serious than reciting du‘aa’ after the prayer. See the answer to question no. 65924. But if one is able to memorise it by heart, that is preferable.
It says in al-Mawsoo‘ah al-Fiqhiyyah (33/57): The Shaafa‘is and Hanbalis are of the view that it is permissible to recite from the Mushaf when praying. Ahmad said: There is nothing wrong with leading the people in praying qiyaam whilst looking at the Mushaf. It was said to him: What about the obligatory prayer? He said: I did not hear anything about it. az-Zuhri was asked about a man who recites in Ramadan from the Mushaf. He said: The best of us used to recite from the Mushaf. End quote.
Shaykh Ibn Baaz (may Allah have mercy on him) said:
There is nothing wrong with reading the du‘aa’ from a piece of paper. If a person has not memorised it he can write the du‘aa’ on a piece of paper and reads it at times when it mustahabb to offer du‘aa’, such as the end of the night or during the night and at other times. But if he is able to memorise it and recite it by heart with proper focus and humility, that is better.
End quote from Majmoo‘ al-Fataawa, 30/31
The scholars of the Standing Committee were asked (8/161):
With regard to praying istikhaarah concerning some matter or need or whatever, is it essential to memorise the du‘aa’ narrated from Prophet Muhammad (blessings and peace of Allah be upon him) – du‘aa’ al- istikhaarah – or can I just read it from the book after the prayer?
They replied: Whether you memorised du‘aa’ al-istikhaarah or you read it from the book, the matter is broad in scope, but you have to strive to have presence of mind, be humble before Allah, and be sincere in your du‘aa’.
And Allah knows best.