yad yajña-puruṣaḥ sākṣād
apatyāya harir vṛtaḥ
tathā—thereupon; sva-bhāga-dheyāni—their shares in the sacrifice; grahīṣyanti—will accept; diva-okasaḥ—all the demigods; yat—because; yajña-puruṣaḥ—the enjoyer of all sacrifices; sākṣāt—directly; apatyāya—for the purpose of a son; hariḥ—the Supreme Personality of Godhead; vṛtaḥ—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 Viṣṇu, the enjoyer of the fruits of all sacrifices; and when Lord Viṣṇu 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 Viṣṇu, not for the demigods.
Link to this page: https://prabhupadabooks.com/sb/4/13/33