"And the LORD spoke to Moses, saying: When a woman conceives and bears a male" (Leviticus 12:1-2). This is what Scripture said: "O that I were as in the months of old, as in the days when God watched over me" (Job 29:2). This verse Job spoke when the afflictions came upon him. He said: "O that I were [as in the months of old]" - would that I had the days that I had when I was in my mother's belly! "As in the days when God watched over me" - this teaches that the infant is guarded while it is in its mother's belly.
Job Longs for the Womb Where God Watched Over Him
Midrash Tanchuma Buber, Tazria 1:1
וידבר ה' אל משה לאמר, אשה כי תזריע וילדה זכר (ויקרא יב א ב), זש"ה מי יתנני כירחי קדם כימי אלוה ישמרני (איוב כט ב), הפסוק הזה איוב אמרו כשבאו עליו היסורין, אמר מי יתנני [כירחי קדם], ולואי היו לי הימים שהיו לי כשהייתי במעי אמי. כימי אלוה ישמרני, מלמד שהתינוק משתמר כשהוא במעי אמו.