[(Genesis 26:1:) NOW THERE WAS A FAMINE IN THE LAND.] This is what Scripture says (Psalm 33:18): BEHOLD, THE EYE OF THE LORD IS UPON THOSE WHO FEAR HIM. It speaks of Abraham, who is called one who fears God, as it is said (Genesis 22:12): FOR NOW I KNOW THAT YOU FEAR GOD. (Psalm 33:18, continued:) UPON THOSE WHO WAIT FOR HIS LOVINGKINDNESS — for he waited upon the Holy One, blessed be He, by His word. (Psalm 33:19:) TO DELIVER THEIR SOUL FROM DEATH — from the death [decreed] by Nimrod. AND TO KEEP THEM ALIVE IN FAMINE (ibid.) — the famine that came in his days, as it is said (Genesis 12:10): NOW THERE WAS A FAMINE IN THE LAND.
Why God Saved Abraham from Nimrod and from the Famine
Midrash Tanchuma Buber, Toldot 5:1
[ויהי רעב בארץ] (בראשית כו א). זש"ה הנה עין ה' אל יראיו (תהלים לג יח), מדבר באברהם שנקרא ירא אלהים, שנאמר כי ירא אלהים אתה (בראשית כב יב), למיחלים לחסדו (תהלים שם) שהיה מיחל להקב"ה על פי. להציל ממות נפשם (שם), ממיתתו של נמרוד ולחיותם ברעב (שם) שבא בימיו, שנאמר ויהי רעב בארץ (בראשית יב י).