You may find that sleeping on your back is the most comfortable position when you have broken ribs, or you may find it more comfortable to sleep on your side. Both of these sleep positions are okay to use when you have broken ribs. Sleeping on your side or on your back will also help to make breathing easier. Try out different positions to find the most comfortable position for you.   Try sleeping on the injured side. If your broken ribs are only on one side, some physicians recommend that you sleep on the injured side because it restricts the movement of your injured ribs and allows you to breathe more deeply on your uninjured side. However, if this position is painful for you, then do not try to sleep on your injured side.  Try sleeping in a recliner. For some people with broken ribs, sleeping in a recliner is more comfortable than sleeping in a bed. Pillows and cushions can help to prevent you from rolling over in the night, which can be painful may even cause you to wake up in the night.  If you are sleeping on your back, then try placing a pillow under each of your arms to keep you from rolling onto your sides. You can also place a couple of pillows under your knees to reduce some of the strain on your back. . Broken ribs may cause you to take shallow breaths due to the pain associated with moving your chest too much. For this reason, it is a good idea to do some deep breathing throughout the day and right before bed as well. Practicing deep breathing can help you to relax and it will also ensure that you are getting plenty of oxygen. To practice deep breathing, lie on your back or recline in a chair and slowly take in a deep breath. Count to five as you take in the breath and then slowly exhale out as you count down from five. As you breathe, try to pull the air down into your belly with your diaphragm. During the first few days, you will need to limit coughing, twisting, turning, and stretching. This might be harder to remember or control at night. Just try to keep in mind that your ribs are connected...

TL;DR in Chinese:
选择自己感觉最舒服的姿势。 使用枕头来增加自己的舒适度。 做深呼吸 限制自己睡觉时的活动。