I have heard before that a segulah for having a boy is to have relations with one's wife twice in one night. I remember hearing this in the name of Chazal. Does anyone know the makor for it?
It comes from Niddah 31b:
הרוצה לעשות כל בניו זכרים יבעול וישנה – One who wants to make all his children males should cohabit once and then repeat it.
Rashi there explains that this comes in continuation to the previous statement in the Gemora that if the wife emits seed first the child conceived will be a male. By first arousing his wife's desire in the initial act, she will emit seed first the second time.
The Gemara says that if the husband loves the wife more it will (may?) be a girl. If the wife loves the husband more, then a boy. (By loves more it means, finishes first.)
So the recommendation for a boy is to have relations twice, thus allowing the wife to finish first the second time.
I will try to find the source.