Can one wear new clothes during Three Weeks? Do pajamas and undergarments have the same rule?
There are 2 issues. The first is the happiness of wearing fresh clothes. This applies from Rosh Chodesh until after Tish'a b'Av (specifically 1/2 day on the 10th for Ashkenazim). Shulchan Aruch 551:6. Garments meant to absorb sweat are not worn for happiness, but to prevent being uncomfortable. So the custom is to wear fresh pajamas and undergarments. I don't know who talks about this for bein hametzarim, but one source is Aruch Hashulchan 389:7
During the three weeks we refrain from making shehechiyanu. This applies to wearing new clothes which give you great simcha (like a new suit). Shulchan Aruch 551:17. We usually will not make a shehechiyanu on shirts and pants and certainly not PJs, but shehechiyanu is situation based so ask your rav.