It's best not to.
While sleeping isn't the most dangerous activity for your ring, better safe than sorry.
Difficulty removing your ring in the morning due to swelling overnight
Hitting the ring just right on your bed or nightstand and cracking it
Scratching yourself or your partner, or snagging sheets or clothes, especially with a raised setting!