Anna,

Charlie tries that on every now and then. The trick that's worked with us is that everytime he gets out of his bed, we pick him up (no talking, no playing) and put him back to bed. He will keep trying to get out, but we just keep putting him back in. Sometimes it takes 10 or 12 times but we don't yell at him, we don't give up, we just silently bring him back to bed.

Eventually he stops trying to get out of bed (because he realises there is no point, and he's not getting attention) and he will sit in bed and play. Or go to sleep.

It has worked for us every single time. Sounds simple, but it does work.