I do vaguely similar things involving sudden unexpected movements in awkward directions from my horse. I hear that 'crack' and then I'm sore for a few days, with limited mobility in some directions. I have been known to do the same simply getting out of bed, and once by...errr...not getting on my horse.
In conjunction with my chiro, I have come up with the following immediate plan (note that IANAD and you may wish to get checked out to ensure it is just soft tissue injury first and foremost):
First, ice the area. This helps to reduce any potential inflammation and can reduce the pain somewhat as well. 15 minutes at a time is the last recommendation I had-any longer and the body starts to over-react to the cold by heating up the area, which counteracts the beneficial effect. Obviously not ice straight on, put it in a tea towel or similar (I have a bag of peas that I use specifically for this, they are not for eating). Ice every hour or so if you can, as often as possible if not. Ice sprays can be nice, but are in my experience less painrelieving than actual ice.
Try to keep the area mobile. This may mean taking painkillers (NSAIDS like Ibuprofen/Voltarol/Naproxen are good as they have a mild anti-inflammatory effect) so that you don't tense the area, which will make it worse. What you don't want to do though is then overuse the area either, because you can't feel the pain courtesy of the painkillers! Gentle mobilisation and relaxation are best.
Once you've got to 24 hrs after injury, heat can be used to ease the pain. I often find that alternating cold and heat works really well for this.
Personally, I usually also go in and see my chiro asap, because in my experience that reduces my healing time by several days, but I am aware that not everyone thinks that this is a good idea.