וַיְכַ֤ל יַעֲקֹב֙ לְצַוֺּ֣ת אֶת־בָּנָ֔יו וַיֶּאֱסֹ֥ף רַגְלָ֖יו אֶל־הַמִּטָּ֑ה וַיִּגְוַ֖ע וַיֵּאָ֥סֶף אֶל־עַמָּֽיו׃
און װי יעקב האָט געענדיקט זײַן צַװָאֶה צו זײַנע זין, אַזױ האָט ער אַרײַנגענומען זײַנע פֿיס אין בעט, און איז פֿאַרגאַנגען, און איז אײַנגעזאַמלט געװאָרן צו זײַן פֿאָלק.
Rashi
ויאסף רגליו means HE BROUGHT HIS FEET into the bed. (Rashi tells us that ויאסף signifies הכניס, he brought in).
Chizkuni
ויאסוף רגליו אל המטה, “he retracted his feet into the bed.” Originally, he had been sitting on the edge of the bed as mentioned at the beginning of the paragraph his feet having been in contact with the floor.
Da'at Zekenim
ויאסוף רגליו אל המיטה, “he gathered his feet into the bed;” he had previously gotten up in bed in order to give a blessing to Joseph’s sons as we know from Genesis 48,2, where he was described as summoning his strength and sitting upright on his bed. As soon as he had completed his blessings he made ready to die.