Melachim I / I Kings 1:1
וְהַמֶּלֶךְ דָּוִד זָקֵן בָּא בַּיָּמִים וַיְכַסֻּהוּ בַּבְּגָדִים וְלֹא יִחַם לוֹ׃
And King David was old, come into days. And they covered him with clothes, but he could not get warm.
Pshat פְּשָׁט
Seventy years and cold
Rashi brings the words of the sages: whoever treats clothes with contempt gets no benefit from them in the end, and David cut off the corner of Shaul's (Saul's) cloak. And another midrash, in the name of Rav Shmuel bar Nachmani: when David saw the angel standing in Jerusalem with a sword in his hand, his blood grew cold from fear. Radak counts the years: David was seventy, for he became king at thirty and reigned forty years. And "he could not get warm" means "his flesh did not grow warm", as is said of the child whom Elisha warmed, and Radak examines how this word is built in Hebrew.
How Rashi and Radak explain it
Remez רֶמֶז
Why clothes do not warm
Radak reads "come into days" as the weakness of old age: David grew weak and took to his bed, and though he was only seventy, the wars he fought drained his strength, and old age leapt upon him. The older a man grows, the less natural heat is in him, and so clothes did not warm him. Radak brings two midrashim: about Shaul's (Saul's) cloak, which he calls far-fetched, and about the angel with the sword, which he calls close, for Scripture itself says David "was terrified by the sword of the angel". Ralbag explains why the servants sought the king not a blanket but a girl: it is known that clothes do not warm of themselves, they only keep the surrounding air from cooling the body. The servants needed something with warmth of its own, and they chose a young maiden, because in her several causes of warmth meet: her own, the one that arises from closeness, and the one that will awaken in the king himself towards her.
How Radak and Ralbag explain it
Drash דְּרָשׁ
The crown of old age
Midrash Tanchuma says: before Avraham no one looked old, and a father could not be told from his son. Grey hair became a crown given to one who does righteousness: Avraham received it, and after him David. Bereshit Rabbah adds that "old" means "acquired two worlds", and names the three of whom it is said "old, come into days": Avraham, Yehoshua (Joshua) and David.
How Midrash Tanchuma (Buber) and Bereshit Rabbah explain it
Sod סוֹד
Days as garments
Noam Elimelech begins with the verse about Avraham: the upper worlds are called "days", and a righteous man by his holiness reaches the upper worlds. "Avraham was old" means "acquired wisdom", "come into days" means he reached the upper worlds, and the same is said of King David. Hence the verse "he asked life of You, You gave him length of days": a righteous man holds life in this world as a thing borrowed for a while, and so he keeps growing stronger in holiness, thinking whether today the loan must be returned, and for this he receives length of days, that is, the world to come. The Maggid of Kozhnitz brings in the name of Rabbi Baruch of Medzhybizh: every righteous man has the root of his soul above, in this world he is only for a while, and by all his deeds he draws holiness from his root downwards. "Old" is the hidden world, "come into days" means he drew it into the world of days and time, and so David too sanctified days and time. The days of a person's life are garments for his soul, and before death all his days gather together, as it is said "and the days of David drew near to die". "They covered him with clothes, but he could not get warm": the sages say David grew cold from fear of the angel, and the Maggid explains: the evil inclination had left him entirely, he could no longer clothe himself in the garments of service and became like an angel, and an angel has nothing to do in this world. Therefore the servants gave him Avishag, whom he was not permitted to approach, and abstaining from her became his service and his garment again.
How Noam Elimelech and Avodat Yisrael explain it