An attachment disorder alone can cause a child to do this. If he does have an attachment disorder - he needs SERIOUS help from a traine professional. It is a horrible disorder caused by abuse/neglect in early childhood. (Horrible not just for them but for everyone around them.) He does need to be evaluated to find out if he was sexually abused also. How could the courts rule that it didn't happen if he was evaluated for it?
My first thought is definatly get him evaluated for abuse as he may be right, dont let it go, Who is at his Mothers house when he visits ,is he left alone with anyone? Can you speak to his Mom about it, does he do it at her house, there are a lot of questions here,You can and should protect this child and he is acting out. Do not punish him for the Behavior, the Fact he hides the Underwear shows you he knows it is wrong. Dont make a big issue it will cause more Anxiety than he must already have. You need Help for him.!!