I should have pointed out how it can be made to work out even without appealing to this, though I do not regard my suggestion to be forced in any way. However, to make sense on the more midrashic level, why Avraham would take another wife:
According to those who take Keturah as Hagar, it is obvious. He was reluctant to drive her away in the first place. Now that Sarah had died and would not be troubled by Hagar's presence, he could take her back and thus make things between them somewhat right.
Even with Keturah and Hagar as two separate individuals, it still is not farfetched to imagine he took a wife at such an old age. Sarah died when Avraham was 137, and he died at 175. Thus, he has another 38 years of life. Avraham kept all the mitzvot in the Torah, even Rabbinic ones, and the Rambam writes (Hilchot Ishut, 15:16)
אף על פי שקיים אדם מצות פרייה ורבייה, הרי הוא מצווה מדברי סופרים שלא ייבטל מלפרות ולרבות, כל זמן שיש בו כוח--שכל המוסיף נפש אחת מישראל, כאילו בנה עולם; וכן מצות חכמים היא שלא יישב איש בלא אישה, שלא יבוא לידי הרהור, ולא תשב אישה בלא איש, שלא תיחשד.
Or, as Hashem says in Bereishit 2:18:
|יח וַיֹּאמֶר ה אֱלֹקִים, לֹא-טוֹב הֱיוֹת הָאָדָם לְבַדּוֹ; אֶעֱשֶׂה-לּוֹ עֵזֶר, כְּנֶגְדּוֹ.||18 And the LORD God said: 'It is not good that the man should be alone; I will make him a help meet for him.'|