(Genesis 25:1:) "Then Abraham took another wife." This is what Scripture says (Ecclesiastes 12:1): "Remember your Creator." What is the meaning of "your Creator"? This is the Holy One, blessed be He. Akavya ben Mahalalel says: Look at three things [and you will not come into the grip of transgression, etc.: From where did you come? From a putrid drop. And to where are you going? To a place of dust, rot, and worm. And before whom are you destined to give account and reckoning? Before the King who is King over kings, the Holy One, blessed be He.] R. Joshua of Sikhnin in the name of R. Levi: And all three of them are in this verse. "And remember your Creator (bora'akha)" — this is the Holy One, blessed be He. "Your well (be'erkha)" — this is the well that came forth from putrid fluid. "Your pit (borkha)" — to the place where you are destined to give account and reckoning. Hence, "And remember."
Abraham Remarries and the Threefold Charge to Remember Your Creator
Midrash Tanchuma Buber, Chayei Sara 7:1
ויוסף אברהם ויקח אשה (בראשית כה א). זש"ה וזכור את בוראך (קהלת יב א), מהו בוראך זה הקב"ה. עקביא בן מהללאל אומר הסתכל בשלשה דברים [ואין אתה בא לידי עברה וכו' מאין באת מטפה סרוחה, ולאן אתה הולך למקום עפר רמה ותולעה, ולפני מי אתה עתיד ליתן דין וחשבון לפני מלך מלכי המלכים הקדוש ברוך הוא]. ר' יהושע דסכנין בשם ר' לוי ושלשתן בפסוק הזה. וזכור את בוראך זה הקב"ה, (באריך) [בארך] זו באר שיצאתה מליחה סרוחה. (בוראך) [בורך] למקום שאתה עתיד ליתן דין וחשבון, הוי וזכור.