It is written in Hagahot Alfasi (= Shiltei Giborim ADK)
“From that which we learned in a Mishnah ‘One who closes the eyes (of a dying person. ADK) with the departure of
the nefesh is considered like a bloodshedder’, it seems correct to forbid that which some people practice, when
someone is goses and the neshomoh is unable to leave, that they shove the cushion from
underneath him so
that he will die rapidly, as they say that the bed contains feathers of birds that cause the nefesh not to depart.
But Rabbi Nathan the Hungarian wrote to permit this.
Afterward I found written in Sefer Chasidim a support for our words, for he wrote: If someone was goses and
unable to die until they place him in another place – they must not move him.
And he wrote: “If someone was goses, and there was someone near that house chopping wood, so that the
neshomoh is unable to depart – we remove the woodchopper from there.
But his words do not contradict one another,
for certainly to do something that will cause him not to die rapidly is forbidden,
as for example to chop wood there so the neshomoh will be prevented from leaving, or to place salt on his
tongue so that he will not die rapidly, is certainly forbidden,
and everything similar it is permitted to remove,
but to do something that will cause his speedy death and the departure of his nefesh is forbidden,
and therefore it is forbidden to move the
goses from his place and leave him in a different place.
It is also forbidden to place the keys of a B”h (=Beit haKnesset: Synagogue or Beit haKevarot: Cemetery ADK) under the head of a goses so that he will die rapidly, because this also hastens the departure of the nefesh, but it is
permitted to remove something that delays the departure of the nefesh.
Rabbi Moshe Isserlis (1530-1572) (also known by the acronym Rema/Rama) was an eminent Polish Ashkenazic Talmudist and Jewish legal authority. Darkei Moshe is a commentary on the Tur, and was meant to serve as a basis for subsequent halakhic decisions. The Rema is best known for his notes to the Shulchan Aruch (see source 14).