Pacman frogs will flip over on their backs as a sign of stress. He was probably stressed when your friend went to clean his tank. I also see in the picture there is a superworm in with him. I hope your friend doesn't feed your pacman exclusively on superworms...