Is he taking any prescribed meds, has he got all his teeth have you had them checked, if we knew his age would be helpful to know what stage he is at.as he is taking well I assume he is 4 or older, Why do you give him Melatonin.. to sleep ?
Chewing is often a behaviour of anxiety. You will note at the bottom of your posting is a dicussion "obsessive chewing" - one of the respondents is a medical doctor. Hope this helps ....
How old is he? Have you tried talking to him about why he feels the need to chew on things? I would definitely take out anything in his room that he could chew up and swallow during the night, like plastic/stuffed toys, and wooden objects. You don't want him choking during the night because he chewed a little piece off of a toy. I would clear out his room at nighttime and just leave his dresser(with only clothes in it) and his bed.