It's funny you should ask this question because although I am far from being a child any more, I myself still grind my teeth at night (according to my husband and if he hadn't told me I would never have known myself).
So I decided to mention it to my dentist on my next check up to see whether there was anything that could be done about it, because you yourself can't really control it yourself while you are in a deep sleep.
He told me that it was quite common but that although it was common it was also not at all good for your teeth or your jaw muscles as it wears the teeth down more than they need to be worn down and could end up giving you a painful jaw.
So the remedy for this is to have a mouth protector made up for you, or a child, to be worn at night. (Mouth protectors are also what boxers wear).
They take a moulding of your mouth, just like they would when they have to prepare an orthodontic brace and in about a week or so it is ready for you to collect from your dentist.
Mine is made up of clear plastic and clicks onto my upper teeth so preventing my bottom teeth from grinding against my upper teeth.
At first it is a bit uncomfortable to wear so what I did was to wear it for a little while each night while I was reading or watching television, like maybe five minutes the first night, then ten, fifteen and so on. Eventually about maybe six or seven nights you find that you have got used to it and then is when you can start wearing it to sleep.
I hope I have answered your question for you.