Top tips for rib injuries from more experience than I care for.
1. Sleep lying on your side ON the injured rib. Put a pillow under the injured rib to act as a splint. Most of the pain comes from the rib moving. The better it is splinted, the better you will sleep.
2. Similar to above, if you are going to sneeze/cough, hold the injured rib firmly to splint it. Again, the less it moves, the less painful it will be.
3. As clwydrider says, there is a risk of chest infection. This comes from being reluctant to breathe deeply, and not clearing your lungs. You have to force yourself to do this through the pain. Once again, hold the injured rib firmly to splint it and breathe deeply several times. Do this several times a day.
4. Keep your upper body mobile. You risk muscular problem in your back if you don’t keep it moving. Make sure you keep your upper body nice and loose.
It takes longer than you think to recover completey, which is frustrating. But you can probably ride sooner than you think. Just don’t do anything too daft.
Painkillers are good and don’t slow the recovery rate. I would recommend oral Arnical pillules. It is questionable how effective topical Arnica is. Absorption rates are quite poor.
Good luck!