the pain of biting himself is just an odd form of stimuli common when kids are under some personal stress. change his bedtime rituals to include more time reading to him telling bedtime stories talking about his day (things that may be troubling him) rubbing/scratching his back or hugging him. consider allowing him to listen to soft music or nature sounds so he can relax and have more pleasant monster-free dreams. that back scratch alone should feel much better than biting himself. he may fall asleep as you rub his back. feeling his stress melt away. help him tell his brain that biting his arm is not something he should be doing and appropriately reward him for the progress he will make in stopping this habit. make bedtime a special time. you may not have many more years to be able to do these bedtime rituals.
why do children bite their own arms? . my six year old just told me that he has been biting his arms at bedtime before falling asleep. when i asked him why he said "i don't know. my brain just tells me to do it. "