If you take your child to the doctor they can do some tests on your child for bed wetting and the doctor can likely prescribe some medication to help slow the production of urine which is the main cause of bed wetting.
Your child produces more urine than the bladder can hold and that's why the child wets the bed because they can't wake up in time.