Check out if he is upset by anything in his life has anything new happened , a move a new Baby ,a loss of any Family member,very often there have been happenings that have triggered the behavior, what do his Teachers say, does he get on with them , does he like school.No point in punishing him unless you know what has caused it .