The holy Rebbe Rephael of Bershid was once a guest at the house of the holy Rebbe Shmuel of Kaminka. The daughter of Rebbe Shmuel, who was barren, asked for a bracha for children.
Rebbe Rephael said that simcha is a sgula for children.
When the daughter told this to her father Rebbe Shmuel, he said that the Tzaddik learned this from the Torah, Neviim and Ksuvim.
From the Torah, as it says, ותצחק שרה בקרבה לאמר - Sarah laughed when she heard that she was going to bear a child.
Neviim: רני עקרה לא ילדה - Be joyous barren one who hasn't given birth - if she is joyous then she will conceive.
Ksuvim - מושיבי עקרת הבית אם הבנים שמחה - If the barren woman is happy she will become a mother.
[This is more correlation than causation but the idea is true. In fact - simcha is a sgula for just about everything good...:-)].