The mantra goes - " yavateervai devataastaa sarvaa veda vidi brahmane vasnti tasmaat brahmanebhyo veda vidbhyo dive dive namskuryaannaasleelam keertayedeta eva devataa preenati"
All devatas reside within the brahmin who knows the Veda. So, by prostrating before the brahmin the devatas become happy.
The devatas exist in the form of mantras. By chanting the mantra their presence is sought. Mantras are stored in the Vedavit brahmin. Therefore the devatas also reside within him.