In cold climates/conditions "layers" is the key to "warmth".
That holds true inside a sleeping bag.
The only difference being, the cold rating of the sleeping bag.
A sleeping bag that is warm at -30F differs significantly from one warm at 40F.
Camping out in mild weather, I generally sleep in sox, sweat pants/shirt.
With foot ware I can slip on next to me.
The reason being, the need to get up/out to relieve yourself.
And/or the need to get up/out to deal with anything else.
Unwise to be "naked" in any of those circumstances.
In cold winter conditions, I generally sleep in sox, down booties, insulated long underwear bottoms, insulated flannel hoody & a watch cap.
In either situation above, you can get out of your bag, slide on foot ware (& a coat if need be) and go outside to deal with about anything.
In all camping out conditions, I always sleep with a web belt with attached loaded sidearm, extra ammo clip, multi-tool, fixed blade & flashlight next to me. I can grab & put on (with or without a coat) in an instant.
Ever had a bear or raccoon rummage your camp at night? Ever had a drunk, high druggy or thief intrude in your camp at night? Ever woke up to another nearby camper screaming in panic? Ever woke and had to deal with a serious medical emergency at night. I have.
Being NAKED in any of those circumstances isn't a good thing.