The Talmud explains (see Nedarim 20a-b) that, ‘different actions’ during the marital intercourse determine important physical and spiritual aspects from the soul that will, G-d willing, descent for the child’s body. The Tanna Rabi Yohanan ben Dahabai – who mystically explains having received knowledge on these subjects through the agency of angels – says in this tractate that, in accordance of “certain” sexual acts, children may be born “dumb, deaf, or blind”! Moreover, there are also effects caused strictly through the ‘time’ when the union occurs. Thus, Kabbalah affirms that: “Truly, there is that which is a ‘proper time’ for marital intercourse… and no other time is appropriate for this junction to be performed with all joy without any ‘extraneous admixture’ [i.e., the chitzonim] save that night [i.e., Shabbat. See Talmud, Ketubot 62b] – when the souls are distributed to the wise, the righteous, and the pious” (Zohar 204b, Vaya’khel). We see then that actions and distinct times in the fulfillment of the mitzvah (of marital union) can afect the soul that is to come. Moreover, through kavanot, the parents may spiritually elevate themselves to infinite heights and greatly impact this soul!
Regarding the subject that the ‘the parents may spiritually elevate themselves etc.’, as it is known, the ‘sexual energy’ (the physical form of the spiritual energy) is an extremely pure energy and must be care for and not wasted due to its fundamental role. As it has been explained, it allows – in accordance to the degree of purity it is used – great ascensions or great falls, chaz v’shalom. As it is written: Vehineh sulam mutsav artsah verosho magia hashamaymah vehineh mal’achei Elokim olim veyoredim bo, “Behold a ladder set up on the earth, and the top of it reached to heaven; and behold the angels of G-d ascending and descending on it” (Bereshit 28:12). On this pasuk, Kabbalah explains (see Zohar 149b, Vayetze) that, “The ladder signifies the spiritual attribute of Yesod [connected to sexual subjects]. To Ya’acov avinu, it was shown that this attribute exists on earth – it literally belongs to ‘mundane subjects’, however, the ‘top of it reached to heaven’ – to wit, when the person heeds to the Divine will and raises this attribute to its origin, then he truly reaches heaven… and ‘this is alluded in thesecret of the pasuk, Mi ya’aleh lanu hashamaymah, Who shall go up for us to heaven [Devarim 30:12]. The initial letters, the Reshei Tevot of this, spell out the word milah [circumcision], and the final letters, the Sofei Tevot, spell out Havaya’ [Tikkunei Zohar 2a] – this means that the person can ascend on high if he purifies this attribute” (the Slonnimer Rebbe, Netivot Shalom).
Regarding the subject of ‘greatly impact this soul’, beyond of has been already considered, it is important to comprehend something of the kavanot during the sexual union. It is very important that these unions be fulfilled in complete joy and happiness. Every mitzvah must be done with great joy, but this one, even more so. It is also important that the married couple, “both should have the same kavanah” (Zohar 81a, Kedoshim; see ibid. 83b for the contrary): to bring down to this level a noble soul, with yirat shamayim (fear of Heaven), a soul that will illuminate the world, to wit, a tzaddik. Hence, it is good to bring to mind a tzaddik on the moment of procreation (see Ramban, Iggeret HaKodesh; R’ Eliyahu de Vidas, Reshit Chochmah, Sha’ar HaKedusha 16). Furthermore, “it is necessary to know that, a child born from the predominant desire from the husband [to have a child, as have been described], receives an ‘extra’ vitality from the father, for this desire means the father’s wish ‘to connect to the Etz Chayim’” (Zohar 209a, Vayigash) in the secret of “She is a Etz Chayim to those who lay hold on her; and happy is every one who holds her fast” (Mishlei 3:18). It is also known that, “‘If the woman emits her semen first she bears a male child; if the man emits his semen first she bears a female child’ [Talmud, Niddah 31a]… Now, he who emits seed last is the one who prevails [i.e., something of his strength]… so the man [who wishes to have a male child] becomes cold, so as to not become heated [during the act], and in this manner the woman is heated [giving seed] before. Afterwards, he is the last to emit seed [thus ensuring that child’s vitality, as explained]. However, many who have followed this did not succed, for all is [baruch Hashem, and thus,] in the Divine will” (Rabi Yehudah Fatiyah, Minchat Yehudah, Parashat Shmuel I, Siman Bet, Ayin Tet, pg. 118). In any case, the person must sanctify himself at the time of marital relations, for all comes from merit. And let him pray throughout the first 40 days of conception: Yehi ra’avah mi’maarei alma shenizke lebanim yierim ushlemim va’chareidim lidvar Hashem venire’eh bachem kedushat tanaim ve’amoraim amen, “May it be the will of the Master of the Universe that we merit G-d fearing and flawless sons who tremble at the word of Hashem. And may we observe in them the sanctity of the Sages of the Mishnah and Talmud. Amen” (Rabi Tzvi Hirsch Kaidenover, Kav HaYashar, Perek Yud Zayin).