What do you call those small bags that are used for sorting things inside a travel bag? Usually used for toiletries, socks, underwear etc.
A ditty bag is "A small bag used to carry one's personal effects or toiletries while traveling." When camping, a ditty bag may be a stuff sack, so-called not because you put stuff into it, but because of how it is put in: stuffed in. That is, a ditty bag looks like a much smaller version of a sleeping bag's stuff sack, or of a sail's stuff sack. You can also get ditty bags made from recycled sails.
Another term sometimes used is mesh bag, referring to a bag made of mesh.
Edit: In my experience, ditty bag also applies to small zippered pocket-size bags, shaped like small sports bags or holdalls. Among ditty bag pictures, the stuff-sack type is most common, but rectangular (sports-bag shaped) zipper-top bags appear too, without the strap handles that appear on larger sports bags.
Note, wikipedia suggests that understood meaning of holdall varies regionally, mentioning different usages in American, British, and Indian English, and suggests that usage of gym bag varies between American and British English. That is, an AE gym bag is (quoting Wikipedia) "a large bag made of cloth or leather typically with a rectangular base and a zippered opening at the top" and evidently a BE gym bag may instead be a stuff sack or duffel bag.
If you are talking about a separate, small case, I would call it a toiletry bag.
If they are integrated into the luggage itself, they are compartments, or maybe sections.