This might sound silly, but apparently it worked?
A friend of mines son gets growing pains & (screams/moans) in pain whilst asleep!
She said if she raises his legs like on a pillow it helps & he sometimes in his sleep has his legs up the wall & is fine!!!???

Maybe try elevating the limbs??? :smt102