Shabbat 114

Having previously been discussing Shabbat clothes, today’s daf (Shabbat 114a) relates a story about a form of clothes as well as an important lesson about the extent to which we must respect and follow the instructions of those who are near death.
We are told that when Rav Yannai was near death he told his sons: ‘Do not bury me in white shrouds nor in black shrouds. I don’t want white shrouds, because it is possible that when I die I will not merit sitting among the righteous, and by wearing white I would feel awkward like a bridegroom sitting among mourners. Similarly, I don’t want to be buried in black shrouds, because it is possible that when I die I will merit sitting amoung the righteous, and by wearing black I would feel awkward like a mourner sitting among bridegrooms. Instead, bury me in the type of clothes that bathhouse attendents wear (i.e. colourful clothes)’.
Seemingly, the basis of Rav Yannai’s fears was a teaching that whatever a person is clothed with upon death goes up with them to the next world (Semachot 9:21, see Tur YD 352), and clearly he was anxious about how he was going to be judged in the next world. Still, the common custom is to bury most people* in simple white shrouds (see Shulchan Aruch YD 352:1), and while this may not have been a fully established custom at the time of this story, the very fact that it is recorded here tells us that Rav Yannai’s request differed from normative practice. Given this, why didn’t Rav Yannai’s sons simply tell their father that his request was unneccesary, non-traditional, or even irrational?
The short answer is that there is a halachic principle (see Gittin 14b) called ‘mitzvah lekayem divrei hamet’ (which though literally translating as, ‘it is a mitzvah to follow the instructions of a dead person’, actually means that it is a mitzvah to do whatever is instructed by someone on their deathbed), and while this principle does not include doing things that directly contravene Jewish law, it does mean that if a person who is close to death asks that something be done that differs from general Jewish customs, especially if what they are asking may ease their worries and reduce their fears, then their request should – wherever possible – be fulfilled.
A somewhat comparable modern example to that of Rav Yannai is found in the responsa of Rabbi Hayyim David Halevy (Asseh Lecha Rav 8:65, Mayim Hayyim 2:66) who received a letter from someone with a pacemaker who expressed great fears that, if buried with their pacemaker, their heart may restart after death. Given this, they asked that the pacemaker be removed prior to their burial. Here too, this request may have been viewed by many as unneccesary, non-traditional, and irrational. Still, as R’ Halevy explains, we are dutibound to ‘free those who are sick from their worries and fears’, and as such, he instructed that these wishes be followed.
What we learn from all this is that while Jewish customs relating to death and mourning reflect many exquisite values (eg. by burying everyone in the same shrouds we do not distinguish between rich and poor), the family of those who are near death must to be sensitive to the worries and concerns of their nearest and dearest – even if they themselves are unconvinced about those worries and concerns, and presuming what is being asked of them does not directly contravene Jewish law, then they should do whatever is asked of them.
* notwithstanding all this, note should be made of the custom to bury those killed by others (either those murdered or killed in war) wearing whatever they were wearing (see Shulchan Aruch YD 364:4). Interestingly, the Rema (ibid.) adds, this too was done for women who died in childbirth or those who died from a tragic fall.