i did too. it was from anxiety
and my muscles would just all tense up and i start shaking when i try to sleep. Everyone is different but if he has anxiety maybe he should take some relaxants etc? I took Xanax
and it really helped but the withdrawal was hell. Everyone is different, don't necessarily need to take prescriptions, perhaps he could try listening to videos that could help him relax abit/to sleep and other natural therapies? When he has the muscle spasms it always help to try and listen to your body and just try to relax every muscle in your body and concentrate on breathing. worked well for me..hope it helps.