That’s a valid fear!!! Maybe if you can’t move, at least install a door at the stairs, and make it so the lock is unusual. Locking at the top instead of at the knob, for example.
We have an open concept home. I always keep the bedroom door closed. I usually sleep in one hour increments. I try to take a nap at some time during the day, so that I don’t become too tired.
Today I took a nap on the couch, with one dog between me and the back of the couch, and the other on the floor next to me with his neck on my hand. I felt safe.