Śrīmad-Bhāgavatam · Text 8.18.28
Who is speaking and story frame
तत्पादशौचं जनकल्मषापहं
स धर्मविन्मूर्ध्न्यदधात् सुमङ्गलम् ।
यद् देवदेवो गिरिशश्चन्द्रमौलि-
र्दधार मूर्ध्ना परया च भक्त्या ॥ २८ ॥
tat-pāda-śaucaṁ jana-kalmaṣāpahaṁ
sa dharma-vin mūrdhny adadhāt sumaṅgalam
yad deva-devo giriśaś candra-maulir
dadhāra mūrdhnā parayā ca bhaktyā
Lord Śiva, the best of demigods, who carries on his forehead the emblem of the moon, receives on his head with great devotion the Ganges water emanating from the toe of Viṣṇu. Being aware of religious principles, Bali Mahārāja knew this. Consequently, following in the footsteps of Lord Śiva, he also placed on his head the water that had washed the Lord’s lotus feet.
Read Śrīla Prabhupāda's purport on Vedabase.io