After bunion surgery, it is essential to keep your foot elevated while you sleep. This helps reduce swelling and pain and speeds up the healing process. The best way to elevate your foot is to prop it up on a pillow.