Yeah - at the physio class we had at hospital, they teach you something called "the knack". Its basically bracing everytime you cough or sneeze, and it helps to protect your pelvic floor from damage (and potentially stop you weeing yourself down the track )
You basically brace your pelvic floor like you are doing a lift while you sneeze or cough. Try it next time!