I have done a lot of tent camping in bear country, in Montana, Idaho, and Alaska.
When I do, I always wear my S&W 44 Mag, on a belt, in a holster, around my waist, when sleeping, as if a bear gets on me, I feel that is the only way I think I would be able to "find my gun" while under attack...
With the gun just nearby, or loose in the sleeping bag, I do not think I could find it, while being savaged by a bear.
I have had bears in camp on several occasion, but I ain't been bit yet.
I have also had a couple of close calls, with moose trying to get into the tent as well...