"And God remembered Abraham and sent Lot out" (Genesis 19:29). And what remembrance was there? Because Lot knew concerning Sarah that she was Abraham's wife, and he did not reveal it; therefore he was saved through that merit, for he had done kindness with Abraham.
Why God Remembered Abraham and Rescued Lot from Sodom
Midrash Aggadah, Genesis 19:29
ויזכור אלהים את אברהם וישלח את לוט. ומה זכירה היתה שם, לפי שהיה יודע לוט בשרה כי היא אשת אברהם ולא גילה, ולכך ניצל באותו זכות שעשה עם אברהם חסד: