Sounds like swim bladder issues... how long did you feed the peas for? Did you feed them anything else while feeding peas?
Not sure if the epsom salt or heat helps with swim bladder issues, one of the others with more fancy goldfish experience can hopefully jump in there
