yad yajna-purusah saksad
apatyaya harir vrtah
tatha—thereupon; sva-bhaga-dheyani—their shares in the sacrifice; grahisyanti—will accept; diva-okasah—all the demigods; yat—because; yajna-purusah—the enjoyer of all sacrifices; saksat—directly; apatyaya—for the purpose of a son; harih—the Supreme Personality of Godhead; vrtah—is invited.
When Hari, the supreme enjoyer of all sacrifices, is invited to fulfill your desire for a son, all the demigods will come with Him and take their shares in the sacrifice.
Whenever a sacrifice is performed, it is meant for satisfying Lord Visnu, the enjoyer of the fruits of all sacrifices; and when Lord Visnu agrees to come to a sacrificial arena, all the demigods naturally follow their master, and their shares are offered in such sacrifices. The conclusion is that the sacrifices performed are meant for Lord Visnu, not for the demigods.
Link to this page: https://prabhupadabooks.com/sb/4/13/33