How could a beautiful young virgin keep David warm physically?
Answer: This response is not based on anything outside the Bible.
I believe this is an excellent question, one that I've personally grappled with recently with a brother in Christ.
First, it might be noted that as a man of David's age and infirmity, it would probably have been extremely gratifying and heart warming to have such a beautiful maiden literally at his side (perhaps all sides) as he struggled to be warmed.
While the argument that they could have merely stoked the fire might sound obvious, there's a deep personal connection between David and his "nurse" as described in 1 Kings 1:
1 Kings 1:1-4: "Now King David was old, advanced in age; and they covered him with clothes, but he could not keep warm. 2So his servants said to him, 'Let them seek a young virgin for my lord the king, and let her attend the king and become his nurse; and let her lie in your bosom, that my lord the king may keep warm.' 3So they searched for a beautiful girl throughout all the territory of Israel, and found Abishag the Shunammite, and brought her to the king. 4The girl was very beautiful; and she became the king’s nurse and served him, but the king did not cohabit with her.
Perhaps we might understand that David could not have intimate relations with an unmarried maiden — particularly in light of his grave mistake with Bathsheba.
Further, as others have mentioned, merely being a young maiden could offer great psychological benefits (warmth included) that may not have been as effective as this young woman. Undoubtedly, David looked upon this blessing for what it really was.
Second, we might understand that David was well-aware of the dangers associated with physical intercourse (1 Kgs. 1:4) with such a young woman: His desire was to be kept comfortable, and this seemed a very acceptable option to those who sought the very best for him. Otherwise, they would almost certainly have found some other suitable alternative.
Third, I think we underestimate David's propriety with this young nurse — because that is explicitly stated in Scripture. There would be no harm in King David being offered someone who might stimulate his aged form through her beauty and warmth, while at the same time offering great relief to a man that had delivered Israel from nearly all her enemies.
It seems to me perfectly acceptable that the servants sought the greatest possible solution to David's dilemma, and that was the beautiful Abishag the Shunammite.
There doesn't not appear to have been any ulterior motives on David's part, not on Abishag's other than David's well-being. He was the great leader and protector of his people, and country, Israel — someone entirely in alignment with God's wishes throughout much of his life.