I wasn't sure whether this was best suited to behaviour or sleep, but I think it belongs here because it's more to do with bed than with sleep.
Our DD is approaching 5 and though I'm sure many a parent would give good money to keep their child in bed all night long, ours takes it to extremes! She won't get out of her bed for anything - pretty sure if her bed caught fire she'd stay in it. She will call for mummy and daddy if she's upset or she's awake before us in the morning, but she won't get out of the bed. She won't get out for the toilet even when she's awake and needs to go, she's perfectly well potty trained in the day but if she wakes up in the morning and it's a while before one of us can get in to her (I'm disabled, I can't move fast!) then she'll wet herself. As soon as one of us enters the room it's like the spell of bed is broken and she will leap out and go to the toilet/take off her pyjamas/play, etc. but she absolutely will not get out of bed without being specifically told at that moment she can get out.
We've practiced scenarios, what do you do if you want a wee and you are in your bed, she tells us she can go to the toilet, even when it's night time, but she doesn't do it, you have to be right there giving her permission to get out.
We're never going to move towards night training if she's going to seek permission to come out of bed every night. She's generally very keen on askin permission for things, she will often ask for something to eat then when we give it to her she'll ask permission to eat it, then sometimes permission to have a second bite from the same plate. This used to be a maddening process at dinner, but she's improved a lot with that one, but we can't persuade her that getting out of bed is allowed. We don't want the opposite, we don't want her wandering all night long and constantly coming into our bedroom or anything, but for her to be prepared to soil herself rather than get out of the bed is a step too far.
Any advice?