How safe is it to wear soft contacts while sleep?

Depends. on the type of contact. There are a few brands that can safely slept in. Discuss this with your eye doctor.
It isn't. There is no reason to wear them while sleeping and you can potentially develop breakdown of the cornea and a serious infection. Your eye surface needs time to breath. Just take out the lenses and sleep soundly.