can be scary for both the child and his parents. It is understandable that you are not quite sure of the best way to handle his surgery. Post-surgery visits and behaviors should be handled on a case by case basis and either your pediatrician
who knows your child well or the medical staff at the hospital can help you decide the best course of action.
Most children's hospitals will allow one parent or guardian to sleep in the child's room overnight. It is rare for two parents to be allowed overnight, but some institutions may allow this. You should speak to one of the nurses on your child's floor in the hospital who can inform you of their specific rules on parent visitation.
In terms of whether or not your child needs time to himself after the surgery, this is a very difficult question to answer without knowing your son. Some children may just want to sleep after a stressful event like an emergent surgery and may not want a lot of visitors. However, many get frightened at needing to have surgery and sleeping in an unknown place. In that respect, most children prefer having their parents with them in the hospital, even if its just sitting on the other side of the room as moral support.
Again, every child is different and each hospital has their own rules on parent visitation, but in general parents are usually allowed to sleep with their child overnight and most children appreciate the support.