When I was little, and I slept over at a friend's house, her mom was appalled that I wore underwear to bed. She said, "It's not good for you. You've got to let yourself air out."
Hmmm, well, the thing is, it's all about personal preference. Yes, it's true that wearing tight underwear at night can lock in moisture, especially if you get hot - and this could create a breeding ground for bacteria to grow, or yeast infections.
But if you've never had a problem with wearing underwear to bed, keep it up.
On the other hand, if you prefer going free, and like the feeling of rolling over and not having your undies go up your butt, continue to ditch those panties during bedtime.