Well, it's a really awkward situation. You might want to quickly cover up and then later, sit down with your wife and discuss how to approach this. It could be a good idea to have your wife communicate to her mother that this was a huge invasion of privacy and should never happen again.
In such a case, it's important to maintain calm as much as possible. After ensuring privacy, talk to your wife. Together, you can decide whether it's necessary to have a more formal conversation with her mother. It's crucial to stress the importance of privacy and respect for boundaries in a family relationship, and make sure this kind of accident doesn't repeat.