This story is mentioned in Padma Purana Shristi Khanda chapter 17. Savitri curses all Gods and Godesses after seeing Brahma had married Gayatri as she came late in yagna. Surprising part is that in this chapter Savitri rains words of curses to all and most curses we read in several Purans and scriptures are given here by Savitri::
130.The priests also worshipped the blazing fire (offering) portion of the sacrificial animals.
131-136.Gods desirous of receiving portions of oblations at the sacrifice then said: " (The sacrifice) should not be delayed; (for an act) performed late, does not give its (desired) fruit; this is the rule that is seen in the Vedas by all the learned."
When two milk (-pots) were ready, the food was jointly cooked, and when the brahmanas were invited, the adhvaryu to whom the oblation was offered had come there, and the pravargya was performed by brahmanas skilled in the Vedas; the food was being prepared. Goddess (Savitri) seeing that said angrily to Brahma who was sitting silently at the (sacrificial) session: "What is this misdeed you are about to do, that through lust you have abandoning me and committed a sin? She, whom you have put on your head (i.e. whom you have given so much importance) is not
comparable with even the dust of my foot. This is what people gathered in the (sacrificial) assembly say. If you so desire, follow that command of those who are (like) gods.
137-141.Through your longing for beauty you have done what is condemned by people; O lord, you were not ashamed
of your sons nor of your grandsons; I think you have done this censurable deed through passion; you are the grandsire of gods
and the great grandsire of the sages I How did you not feel shame when you see your own body? You have become ridiculous
for people and have harmed me. If this is your firm feeling, then O god, live (alone); salutation (goodbye) to you; how shall I
(be able t J) show my face to my friends? How shall I tell people that my husband has taken (another lady as) his wife?"
Brahma said:
142-144.Immediately after the time of initiation, the priests prompted me: Without wife the sacrifice cannot be performed; bring your wife quickly. This (other) wife wasbrought by Indra, and presented to me by Visnu; (so) I accepted her; O you of beautiful eyebrows, pardon me for what I have done. O you of good vow, I shall not wrong you like this again. Pardon me, who have fallen at your feet; my salutation to
you. Pulastya said:Thus addressed, she got angry, and set about to curse Brahma:
145-148."If I have practised penance, if I have pleased my preceptors in the groups of brahmanas, and at various places, brahmanas will never offer you worship, except your annual worship (that falls) in the month of Kartika which the brahmanas will (alone) offer, but not other men at any other place on the earth." Saying these words to Brahma, she said to Indra who was nearby: "O Sakra, you brought the cowherdess to Brahma. Since this was a mean deed you will obtain its fruit.
149.When you will stand (ready to fight) in a battle, you will be bound by your enemies and will be reduced to a very (pitiable) plight.
150.Being without any possession, having lost your energy, you will, having faced a great defeat, live in your enemy's city,
(but) will soon be released."
151-153.Having cursed Indra (like this) the goddess then spoke (these words) to Visnu: "When, due to the curse of Bhrgu you will be born in the mortal world, you will there (i.e.in that existence) experience the pain of separation from your wife. Your wife will be taken by your enemy beyond the great ocean; with your mind struck by grief you will not know (by whom she is) taken, and you will be unhappy along with your brother after having met with a great calamity.
154-156.When you will be born in the Yadu-family, you will be named Krsna; and being the attendant of beasts will wander for a long time." Then the angry one said to Rudra: "When you will stay in the Daruvana, then, O Rudra, the angry sages will curse you; O you skull-holder, mean one, you desire to snatch away a lady from amongst us; therefore, this arrogant generative organ of yours will today fall on the ground.
157-160.Void of manliness, you will be afflicted by the sages' curse. Your wife residing at the Gaiigadvara will console
you." "O Agni, you were formerly made all-consumer by my son Bhrgu, always righteous. How shall I burn (you) who are already burnt by him? O Agni, that Rudra will submerge you with his semen, and your tongue (i.e. your flame) will blaze more
while consuming things not fit for a sacrifice." Savitri cursed all
the brahmanas and priests who had become the sacrificial priests for looting her husband, and who had, for nothing,
resorted to the forest:
161."Resort to all sacred and holy places through greed only; you will always be satisfied only (when you get) food of
others; but will not be contented with food (prepared in) your own houses.
162-164.By sacrificing that which is not to be sacrificed and by accepting what is contemptible, by earning wealth and
spending it purposelessly—by that (your) dead bodies will only be departed spirits without obsequial rites (being offered to
them)." In this way that angry (Savitri) cursed Indra, so also Visnu, Rudra, Agni, Brahma and all the brahmanas.
165-166.Having thus cursed them, she went out of the (sacrificial) assembly. Having reached the preeminent Puskara, she settled (there). She said to LaksmI who was laughing and also to the beautiful wife of Indra and also to young ladies (there) : "I shall go there where I won't hear any sound."
167.Then all those ladies went to their respective residences. Savitri, who was angry, set about to curse them
too.
168."Since these divine ladies have abandoned me and gone, I, who am extremely angry, shall curse them also:
169-171.Laksmi shall never stay at one place. She, the mean and fickle-minded one, will stay among fools, among the
barbarians and the mountaineers, among the foolish and the proud; so also as a result of (my) curse, you (i.e. LaksmI) will stay with mean persons such as the accursed and the wicked ones."
172-174.Having thus given a curse (to Laksmi), she cursed Indrani: "When Indra, your husband, oppressed by (the sinof) murder of a brahmana, will be unhappy, and when his kingdom will be snatched away by Nahu§a, he will, having seen you, ask for you. (He will say) 'I am Indra; how is it that this childish (lady) does not wait upon me? I shall kill all gods if I do not obtain SacI (i.e. Indraru)'. Then you who will have to run away, and will be alarmed and grieved, will stay in the
house of Brhaspati, as a result of my curse, O you of wicked conduct and proud (one)."
175-178.Then she pronounced a curse on all the wives of gods: "All these (ladies) will not get affection due from children;
they will be scorched (with grief) day and night and will be insulted and called 'barren'." Gauri, of an excellent complexion was also cursed by Savitrl. She, who was weeping, was seen by
Visnu and he propitiated her: "O you of large eyes, do not weep; you ever-auspicious one, (please) come on; entering the
(sacrificial) assembly, hand over your girdle and silken garments; O you wife of Brahma, receive the initiation, I salute your feet."
179.Thus addressed, she said to him: "I shall do as you say; and I shall go there where I shall not hear (any) sound."
180-215.Having said this much, she (going) from that place and having climbed up a mountain, remained there. Remaining in front of her with great devotion, Visnu, joining his hands and having bent down, eulogised her.
The curse how they turned to River is also mentioned in Padma Purana::
Padma Purana Uttara Khanda:
CHAPTER ONE HUNDRED ELEVEN
The Greatness of Krsna and Veni
Prthu said:
1-2.You told (me) that formerly Kalaha came out of the body of the merchant on the bank (of the confluence) of Krsna and Veni (and went) with the attendants of Siva and Visnu.
(Now) O you who know Dharma, tell me about the greatness of the two rivers and that place. I have a curiosity about it.
Narada said:
3-8a.Krsna is actually the dark-bodied one, and Veni is god Siva. (Even) the Four-faced (Brahma) is not able to describe the greatness of their confluence. Yet, I shall tell you about their origin. Listen to it. Formerly in the age of Caksusa Manu, Manu's grandfather (i.e. Brahma) was ready to perform a sacrifice on the charming peak of the Sahya mountain. Surrounded by hosts of all gods, and with Visnu and Siva, he after making the preparation for the sacrifice, went to the peak of that mountain. At the time (sacred to) god Brahma (i.e. the early part of the day) the hosts of sages like Bhrgu gathered there to initiate him. Then, through the brahmanas Visnu called the elder wife
Svara. When she was coming slowly, Bhrgu said to Visnu: Bhrgu said:
8b-9a.O Visnu, you called Svara; but she is not coming quickly. This is the transgression of the auspicious moment. How can the rite of initiation be done? Visnu said:
9b-10a. If Svara is not coming quickly, then put Gayatri here (i.e. in her place). Can this wife of him also not join him in the meritorious deed? Narada said:
10b-13.Rudra also, in the same way, approved of Visnu's words. That Bhrgu, hearing those words, seated Gayatri to the right of Brahma, and performed the rite of initiation. O king,while they were duly performing the rite of initiation of Brahma, Svara came to the place of the sacrifice. Seeing Gayatrl initiated with Brahma, Svara due to jealousy for her co-wife, angrily said (these) words: Svara said:
14-16.(When) those that do not deserve to be honoured,are honoured, and those that deserve to be honoured are ignored,
three (inauspicious things) take place there: famine, death, fear. You have seated this younger one on my seat. Therefore, all of
you, being devoid of consciousness will have various forms. Since she has sat on my seat, on the right (of Brahma), therefore let her have a body of a river invisible to the people.
Narada said:
17-18.Then hearing that curse, Gayatrl trembled; and getting up, she, though restrained by gods, cursed that Svara.
"As Brahma is your husband, so he is also mine. You have in vain cursed me. You too (will) become a river." Narada said:
19.Then all gods led by Siva and Visnu felt grief; saluting (by prostrating) like a staff on the ground, they requested Svara:The gods said:
20-21.O goddess, since you have cursed all of us like Brahma, if we all become devoid of consciousness and turn into rivers, then these three worlds will certainly perish. You have acted imprudently. Therefore, withdraw this curse. Svara said:
22-24.O best gods, since at the commencement of the sacrifice you did not worship the lord of the attendants (i.e Ganesa), therefore this obstacle, due to my anger, has indeed come up. Nor again, these words of me will be untrue. Therefore, with your portions dulled, turn into rivers. We, the two cowives, shall become two rivers, flowing into the west, by means of our portions, O gods.Narada said:
25-31.O king, then hearing her words Brahma, Visnu and Siva became dulled and turned into rivers just by means of their portions. Visnu became Krsna, and god Siva Veni. Brahma then separately became Gariga having humps (of waves). The wise gods also, having dulled their portions, became good rivers separately (flowing) from the peaks of Sahya mountain. The best rivers, (formed) with the portions of gods, flowed into the east. Gayatrl and Svara. joined together, flowing westward, came to be called Savitri. Both Visnu and Siva appointed at that sacrifice, became (known) by the names Mahabala and Atibala.O king, I am not able to describe the greatness of the
two rivers. Gods like Brahma went (from the place) and remain, through their portions, as rivers. Every act of him who listens with devotion to this great (account of) Krsna, removing sins or causes (others) to hear it, would become meritorious, and gets the fruit due to seeing her and bathing in her (water).