The gopis, and in fact any householders, knew the process for being purified by chanting Vedic hymns. The gopis executed this process first to purify themselves and then to purify the child Krsna
SB Canto 10.1 to 10.13
The gopīs first executed the process of ācamana, drinking a sip of water from the right hand. They purified their bodies and hands with the nyāsa-mantra and then applied the same mantra upon the body of the child.
Nyāsa-mantra includes ācamana, or first drinking a sip of water kept in the right hand. There are different viṣṇu-mantras to purify the body. The gopīs, and in fact any householders, knew the process for being purified by chanting Vedic hymns. The gopīs executed this process first to purify themselves and then to purify the child Kṛṣṇa. One executes the process of aṅga-nyāsa and kara-nyāsa simply by drinking a little sip of water and chanting the mantra. The mantra is preceded with the first letter of the name, followed by anusvāra and the word namaḥ: oṁ namo 'jas tavāṅghrī avyāt, maṁ mano maṇimāṁs tava jānunī avyāt, and so on. By losing Indian culture, Indian householders have forgotten how to execute the aṅga-nyāsa and are simply busy in sense gratification, without any advanced knowledge of human civilization.