ספר המדות Children / Part I · כח
Sefer HaMiddot 237
כח. אַרְבָּעִים יוֹם קדֶם יְצִירַת הַוָּלָד יִתְפַּלֵּל עַל אִשְׁתּוֹ, שֶׁתֵּלֵד זָכָר.
28. Forty days (of the beginning of a pregnancy, which is) before the creation of the fetus, one should pray that his wife will give birth to a son.