"And Sarah said, 'God has made laughter for me,' etc." (Genesis 21:6) — for at the time that Sarah conceived, all the barren women in the land conceived, and just as she rejoiced, so all the barren women rejoiced. Another interpretation: "He has made laughter for me" — merit caused Isaac to be born. This teaches that the Holy One, blessed be He, took from me a yod and raised up for me in place of the yod a heh, and that yod was given to Isaac.
Sarah's Laughter and the Yod Given to Isaac in Midrash Aggadah
Midrash Aggadah, Genesis 21:6
ותאמר שרה צחק עשה לי אלהים וגו'. כי בעת שנתעברה שרה נתעברו כל עקרות שבארץ, וכשם שהיתה היא שמחה כך היו כל עקרות שמחות: ד"א צחק עשה לי. זכות גרם ליצחק שנולד, מלמד שנטל הקב"ה ממני י' והעלה לי במקום היו"ד ה', ואותה י' ניתנה ליצחק: