On Rosh Hashanah Sarah, Rachel, and Hannah were remembered [granted children]. From where is this derived? Rabbi Eleazar said: it comes by a verbal analogy, "remembering" to "remembering," "appointing" [visiting] to "appointing." It is written concerning Rachel, "And God remembered Rachel" (Genesis 30:22), and it is written concerning Hannah, "And God remembered her" (1 Samuel 1:19). And "remembering" is derived from "remembering" stated about Rosh Hashanah, as it is written, "a sabbath-rest, a remembrance proclaimed with the blast" (Leviticus 23:24). And "appointing" is derived from "appointing" stated about Hannah: it is written of Hannah, "for the LORD had appointed [visited] Hannah" (1 Samuel 2:21), and it is written of Sarah, "and the LORD appointed [visited] Sarah" (Genesis 21:1).
On Rosh Hashanah God Recalled the Three Barren Women
Yalkut Shimoni on Nach 78:20
בראש הנשה נפקדה שרה, רחל וחנה מגלן א"ר אלעזר אתיא זכירא זכירה זכרירה פקידה פקידה, כתיב בה ברחל ויזכור אלקים את רחל וכתיב בה בחנה ויזכרה אלקים. ואתיא זכירה זכירה מראש השנה דכתיב שבתון זכרון תרועה, ואתיא פקידה פקידה מחנה.. כתיב בחנה כי פקד ה' את חנה וכתיב בה בשרה וה' פקד את שרה: