They may feel scared, lonely, stressed about family dynamics or pals, or or or. Some kids
yearn to be comforted and to have some types of
attention that they feel they aren't getting otherwise. Sometimes yearning for attention &/or control can result in behaviors like bed-wetting. If there's a stress/emotional component to the cause, it seems to me that that component will escalate as the child gets older and is still bed-wetting.