Jjohnst: First, this is a dangerous habit because these things, if they fail to pass, can cause a blockage in your dog's intestine that can actually kill your dog. A friend of mine almost lost a labrador retriever after her lab swallowed a baby wipe and it caused a blockage.
The name for this is pica - the definition of pica is the ingestion of nonnutritive, nonfood items. Common nonfood items eaten with pica are fabric, plastics, sticks and rocks. Your dog is eating fabric in the form of underwear etc.
How old is your dog? Some puppies will chew clothing items and swallow some of the fabric. It is normal for puppies to chew and rip things apart (just because it is normal doggy behavior does not mean it's a thing you should allow your puppy to do). Teach your puppy to chew on his own doggy items.
Pica in dogs past puppyhood, tends to involve extreme focus on eating certain selective items. Pica that involves an adult dog with extreme focus is not a normal behavior. The dog can develop such intense focus on eating clothing that it will disregard other activities. It is quite possible that this might be due to an OCD (obsessive compulsive disorder).
This behavior might also be attention-seeking behavior and a form of keep away (i.e. if dog swallows sock, he is definitely successful in keeping it away from you). Make sure you pay attention to your dog for behaving. Make sure that when he grabs a sock or underwear that you remain calm and focus on getting him to come and exchange it for something else (it helps if you have a leash on him).
Of course the perfect solution would be to keep your clothing picked up and out of the reach of your dog.
Another thing would be to supervise your dog and to leave a 6' line or 6' leash on her. Then if she gets some underwear tell her to come quickly and make her come with the leash prior to having the time to swallow the item.
Also, teach the command "leave it" and work on setting her up with several items spread out on the floor that she is not supposed to have. If she glances at them tell her leave it and back away (she is on the leash, so when you back up she will have to follow). When she follows you, praise and reward her.
Also practice exchanges with your dog. Give her a piece of clothing that is too large to swallow and trade a juicy cube of steak or liver for the clothing then give the clothing back and repeat the exchange around 5 or 6 times.
Again I stress the importance of managing your dog and picking up clothing that she may want to eat.