ספר המדות Children / Part I · יח
Sefer HaMiddot 227
יח. מַה יַּעֲשֶׂה אָדָם, וְיִהְיֶה לוֹ בָּנִים זְכָרִים, יִשָּׂא אִשָּׁה הַהוֹגֶנֶת לוֹ, וִיקַדֵּשׁ אֶת עַצְמוֹ בִּשְׁעַת תַּשְׁמִישׁ, וִיבַקֵּשׁ מִמִּי שֶׁהַבָּנִים שֶׁלּוֹ.
18. What should a man do to have male children? He should marry a woman who is fitting to him, sanctify himself at the time of marital relations, and ask [for sons] from the One to whom all sons belong.