The only way to see if there's a medical cause is to see his doctor. He may be having tantrums
Often, kids act out to get attention, even negative attention;withdrawing attention from the misbehavior (i.e., timeouts) & giving positive attention for good behavior helps. Distracting your child when you see misbehavior start can head it off, too. Ensure he doesn't get overtired or famished.