A.H.
My son gets leg aches a lot, especially with the change of weather and using an a/c. We keep him in long pants every night. We choose lightweight cotton pants and a short sleeved cotton shirt. When he wakes crying with leg aches, we give him Tylenol and use a warm blanket and or heating pad until the aches subside then put him to bed with just a blanket over his pants. We never leave the heating pad on in the bed. Rubbing the legs until they feel better also helps as this generates heat.
Good luck because this can cause some long nights.