Wrong. Wrong. Very wrong.
Bed wetting has many reasons, none of which deserves to be physically assaulted with a spanking.
Ask your son's pediatrician about reasons for bed wetting or take your child to a psychologist to get down to the real problem.
your child just creates more problems on top of problems and quite frankly, your child needs compassion, not a spanking. Stop taking your frustrations out on hitting your child as that is not the answer to stop the bed wetting.