I visited Physiotherapist today and found that I'd suffered for 5 days with a dislocated rib. After some "gentle" manipulation he popped it back into place for me and told me it could take anywhere between 2-6 weeks before it feels normal again!
Cracking and popping are usually associated with ligament problems. By themselves, the symptoms aren't serious, but with pain there is a possibility that you tore a ligament. You could try an icy-heat wrap for temporary pain relief. If the cold in the wrap bothers you, there are some that are just heat wraps. They are like large band-aids and can be worn to bed, which may assist with a better night's rest for you.