All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
The doctrine of the Hanafi and Maaliki scholars in addition to the most correct doctrine of the Shaaf‘i and Hanbali scholars is the recommendation of directing the dying person towards the Qiblah (i.e. direction of prayer) laying on his right side. If this is not possible, he may be placed on his back while his feet are towards the Qiblah. There are no Marfoo‘ Hadeeths in this regard as stated by Shaykh Al-Albaani in his book, Ahkaam Al-Janaa’iz.
However, there are narrations of some of the Companions and their followers in this regard. The following are some examples:
‘Umar Ibn Al-Khattaab said to his son, ‘Abdullaah : “When I experience death, direct me towards the Qiblah.” [Ibn Abu Shaybah]
Ibraheem An-Nakh‘i said: “The righteous predecessors used to favor directing the dying person towards the Qiblah.”
At the time of washing, he may be directed in such a way that facilitates the washing and it is not necessary to direct him towards the Qiblah.
With regards to placing him in the grave, the doctrine of the four Imaams and others implies placing him on his right side so that he faces the Qiblah, as at the time of dying. As for the funeral prayer, the Imaam stands at the head of the male and at the middle of the female. Moreover, it is recommended to place him on his right side, facing the Qiblah.
Allaah Knows best.