There is more than one way for you to end up with a rib injury. From rib fractures to bruised ribs, there are a few possibilities. But, the most common cause is blunt force trauma to the chest. This can come from:
Car accidents are a common cause of bruised or broken ribs.
Though wearing a seatbelt can help to protect the ribs, the impact of a collision can still cause them to sustain damage.
In a worst-case scenario, you may end up with multiple broken ribs. Left untreated, a rib fracture can lead to serious complications, such as lung collapse or puncture .
Take care after a car accident and seek medical attention if you're experiencing any rib pain or discomfort.
Any sport, no matter how aggressive or physical, has the potential to cause a rib injury.
Even activities like golf and baseball can end with a bruised or broken rib if you swing too hard or get hit by a ball in just the wrong spot.
Other high-contact sports, such as football, rugby, and hockey, are especially likely to cause this type of injury.
It goes without saying that a fall can cause a rib cage injury. Whether you're taking a tumble down the stairs or slipping on some ice, a hard fall can leave you with a bruised rib. Elderly adults are especially susceptible to this type of injury due to weakened bones.
Other than that, there are a few other ways you can end up with bruised or fractured ribs.
For example, if you have a medical condition like osteoporosis or cancer that has spread to the ribs, that can also cause ribs to break or bruise easily.
Symptoms of bruised or broken ribs include pain when breathing, coughing, or moving; difficulty taking a deep breath, and sharp pain when touched. 
If you think you may have bruised or broken ribs, or you experience any of the symptoms we've mentioned (and are about to mention) it's important to seek immediate medical care for an accurate diagnosis and treatment plan.
Apart from the ones we've mentioned, some other symptoms of bruised ribs include swelling and bruising around the affected area.
This is caused by bleeding under the skin due to damaged blood vessels. The swelling and bruising can make it difficult and painful to move or even breathe.
Another symptom of bruised ribs is difficulty moving. This is due to the amount of pain you're likely to feel when trying to move the affected area or switch your sleep position.
You may also find it difficult to take deep breaths or cough without making the pain worse.
Finally, one of the most common symptoms is pain while breathing, coughing or laughing.
Just like you would feel pain while moving, you would also feel pain whenever you would move your rib cage by inhaling, coughing or laughing.
It's not easy to sleep with broken ribs or even bruised ones – no matter your sleeping style.
The pain can make it difficult to find comfortable sleep positions and you will probably have trouble breathing.
But, there are a few things you can try:
Generally speaking, the best sleep position to relieve pain and pressure on your ribs is to sleep on your back. This position minimises involuntary movements during the night.
It also takes the pressure off of your fractured bone and allows you to breathe more easily and with less discomfort.
While certainly not perfect, it's often the best option for those with any degree of a rib injury.
Another thing you can do if your ribs hurt is to get a recliner and try to fall asleep in a somewhat upright position.
This can take some of the pressure off your rib bones and make it easier to breathe.
However, if you have hip or lower back issues, keep in mind that sleeping upright could aggravate those problems.
Pillows, especially a wedge pillow, will be your best friend when trying to sleep with a rib injury.
Use them to elevate your body from a horizontal position into a more upright one.
This can help relieve some of the pressure on your ribs and make it easier to breathe.
Another thing you can do is use a regular pillow when you need to cough. Placing a pillow on your chest and gently squeezing it could help dampen the pain.
While you certainly won't be able to take a deep breath without pain, incorporating breathing exercises can certainly help you.
Start with shallow breaths and work your way up slowly.
By pushing through the pain, you'll allow yourself to breathe as fully as possible, which can help to improve your overall lung function, avoid developing pneumonia, and flood your body with oxygen – a necessary component for healing.
Any kind of movement will be painful with bruised or broken ribs. Sleeping may be the worst of all because you often move around without realising it.
To limit your movement while sleeping, try limiting your range of motion by sleeping on your back and placing pillows or other comfortable objects around you to prevent you from turning around at night.
You can also sleep on your side, if that's comfortable, with a pillow between your legs and one supporting your back to keep you from rolling over.
Finally, while some may recommend compression wraps and bandages to immobilise an injured rib cage and limit repetitive movements and alleviate pain – we'd advise against it. 
Compression wraps could limit your ability to breathe deeply, which could increase the risk of chest cavity internal bleeding, lung infection or pneumonia.
If the pain becomes unmanageable, you may need to take pain medicine.
There are a variety of over-the-counter and prescription pain meds available, so talk to your doctor about what would be best for you.
Just remember that pain medication can have side effects and that some are highly addictive, so take them as directed and don't drive or operate machinery while under their influence.
Also, make sure you seek professional medical advice before taking any pain relievers, or if you have heart disease, high blood pressure, kidney disease, liver disease, or have had stomach ulcers in the past.
Every night before you go to bed, apply ice on the affected ribs for 15-20 minutes.
Cold therapy will help to reduce severe pain and inflammation and even reduce swelling which should help you sleep better.
Also, if need be – use an ice pack during the day, too. Your fractured rib will thank you.
While you do need to rest, it's important that you don't spend the entire day in bed.
Sure, it's perfectly normal to feel down and out of sorts if you're in pain, but you should try to stay active as much as possible as it will help to increase blood flow and promote healing.
Plus, it will help to keep your spirits up, which is an important part of the healing process.
Now, we don't mean you should do pushups or lift heavy objects. Just walk a bit around the house and that should be fine.
Don't hold your coughs in as that could make the pain worse.
Instead, as we've said, use a pillow to support your chest and gently squeeze it while you cough to dampen the pain.
To be fair, you will have to be careful not to cough too hard, as severe coughing could cause more pain or lead to a collapsed lung, lung infections, which would turn a bruised or fractured rib into a medical emergency.
It goes without saying, but you need to stick to healthy food and stay away from unhealthy habits if you want to heal quickly.
You'll want to sleep at least eight hours a day. Sleep deprivation is recovery's worst enemy.
This means eating a balanced diet. Eating plenty of fruits, vegetables, and lean proteins, as well as avoiding processed foods, sugary drinks, and excessive alcohol consumption.
Of course, giving up smoking is a given at this point.
While it might seem counterintuitive, sleeping on the affected rib area can actually help to reduce pain.
The idea is, sleeping on the injured side should limit your movement at night, keep the pain away and improve your sleep quality.
However, if you find this makes your ribs hurt more, just find whatever works best for you. But side sleeping should do the trick.
Generally speaking, ribs heal for about 6 weeks. However, depending on the severity of the injury and several other factors, it could take a bit longer.
During this time, it's important to limit your movement as much as possible to prevent additional pain and discomfort and speed up the recovery process.
Rib injuries, whether bruised ribs or flail chest, can be extremely painful.
However, with the right care and treatment, most people make a full recovery within 6 weeks.
In the meantime, it's important to limit your movement as much as possible, take pain medications (if needed), and do your absolute best to get plenty of rest. And when it comes to how should you sleep with bruised ribs, just make sure not to irritate the injury and follow your GPs instructions.