Answered by Shaykh Abdurrahman ibn Yusuf Mangera
Is it permissible to think of the Prophet ( peace and blessing of Allah upon him) while in prayer especially when in qiyam, what do the major hanafi ulema say?
Assalamu alaykum
In the name of Allah, the Inspirer of truth
I t is permissible to think of the Greatest benefactor of Mankind Muhammad sallallahu alayhi wasallam while in prayer, even in the standing posture.
Since it is permitted, or actually virtuous to ponder over the meaning of the Qur’an even during the prayer, it would be permissible to think of the Prophet Sallallahu alayhi wasallam as well.
However, if the person is performing alone, and has to recite portions of the Qur’an then he should think and reflect over what he is reading, so he does not become confused and make mistakes.
And Allah knows best
Abdurrahman ibn Yusuf