Śrīmad-Bhāgavatam · Text 3.5.30
Who is speaking and story frame
अहंतत्त्वाद्विकुर्वाणान्मनो वैकारिकादभूत् ।
वैकारिकाश्च ये देवा अर्थाभिव्यञ्जनं यत: ॥ ३० ॥
ahaṁ-tattvād vikurvāṇān
mano vaikārikād abhūt
vaikārikāś ca ye devā
arthābhivyañjanaṁ yataḥ
The false ego is transformed into mind by interaction with the mode of goodness. All the demigods who control the phenomenal world are also products of the same principle, namely the interaction of false ego and the mode of goodness.
Read Śrīla Prabhupāda's purport on Vedabase.io