"For the LORD had fast closed up ('atzor 'atzar, lit. 'closing, He had closed')." Why is the closing-up doubled? Because they could neither pass water, nor relieve themselves, nor emit any semen at all. "Because of Sarah" — when Sarah would say to the angels, "Strike Abimelech," they would strike him; and when she would say to them, "Let him be," they would let him be. And from where do you say that Abimelech was stricken with great plagues, just as Pharaoh was stricken? And likewise, from where do you say that Pharaoh was stricken with closing-up, just as Abimelech was stricken? "Because of" / "because of" — by a verbal analogy (gezerah shavah).
Why God Sealed Abimelech's House and Struck Him for Sarah
Midrash Aggadah, Genesis 20:18
כי עצר עצר ה'. עצירה עצירה כפולה למה, שלא יכלו להטיל מים ולא לעשות צרכיהם ולא לשפוך שכבת זרע כלל: על דבר שרה. בעת שהיתה אומרת שרה למלאכים הכו לאבימלך, היו מכין אותו, וכשהיתה אומרת להם הניחוהו היו מניחין אותו, ומנין אתה אומר שלקה אבימלך בנגעים גדולים כשם שלקה פרעה וכמו כן מנין אתה אומר שלקה פרעה בעצירה כשם שלקה אבימלך, על דבר על דבר לגזירה שוה: