UK origin. Named after the French girl's name Mathilde, and generally used to express a combination of amusement and embarrassment (sometime with a dose of incompetence), much like the world view's the French.
Doing a Maddy is most commonly used when you have done something that is embarrassing to you, but amusing to others unintentionally. It is often used as a pre-emptive response to the ridicule you will anyway be in for and admit defeat before it even begins.
Laura: "I did a Maddy this morning..."
Lisa: "Really? What happened?"
Laura: "I overslept and tried to wash my hands with toothpaste"