When frogs flip over and unable to right themselves is a sign of possible nerve damage, bacterial or viral infection. Make sure you separate the frogs as mentioned by Grif. I am not sure if there is anything you can do