How can you sleep with a broken wrist?

Elevated on pillows. Its always best to try to keep the limb elevated after a fracture to decrease swelling. Placing the arm on pillows to the side as one sleeps is one way to accomplish this.
Pillows on the chest. A pillow on your chest or at your side with your fingers pointed up higher than your elbow and higher than your heart no matter what your position is helpful. Ice may be used but not if there are circulation issues or problems. Do not keep your hand way above your head. Just gentle elevation higher than your heart in the morning make sure you move your shoulder and elbow and fingers to loosen.