Rabbits generally love peeing and pooping on soft things, so beds commonly are consistent targets, regardless of the rabbit’s litter habits outside the environment. It’s also a place permeated with your scent, which can activate such behavior.
In terms of the safety, it is generally fine as long as you’re OK with the possibility of rolling over into rabbit pee, haha. Since rabbit sleep schedules do not perfectly align with us, it is unlikely a rabbit would sleep with you the whole night. In my old apartment, Wick would sleep on top of the dresser at the foot of my bed and then hop off and wake me up at 5AM. It was cute, but I had to deal with a lot of random pees and poops on my bed and dresser.
100% cotton is generally OK. Pee and poop will wash out, though if it is a pee that is highly colored (like bright orange), it may leave a stain if not addressed immediately.
The answers provided in this discussion are for general guideline purposes only. The information is not intended to diagnose or treat your pet. Seek the advice of your veterinarian or a qualified behaviorist.