From an article about the 2010 Ig Nobel Awards:
Awarded to psychologist Richard Stephens and others at Keele University for confirming that swearing relieves pain. Stephens, who began the study after striking his thumb with a hammer, found volunteers could tolerate more pain if they repeated swearwords rather than neutral words. He suspects that "swearing induces a fight-or-flight response and nullifies the link between fear of pain and pain perception".
Man, do I have a plethora of experiences I could use to back up these findings. Exhibit A: When I was a freshman in college I played soccer for a small Lutheran college in Nebraska. Before one home game our coach told us that his wife was disturbed by some of the language she heard from us on the field and he asked us to watch our mouths. Well, we all thought he was full of crap but me being a wet-behind-the-ears freshman I decided to do my best to honor his request. I was doing fine until midway through the second half when an opposing player absolutely demolished me with a late tackle. He hit me so hard I did a full flip and landed on my back, and since these were the days before shin guards were required I had no protection where he hit me. As soon as I hit the ground I spewed out so many f-bombs and unique combinations of every curse word known to man that I'm sure I made even the saltiest people in attendance blush. When they dragged me to the sideline I stole a glance at the coach's wife and she looked like she'd been sucking on a bagful of lemons, but I couldn't have cared less because my leg was half broken and the cussing really did seem to help.