Whether you choose to dry your damp clothes out inside your sleeping bag or not, the most important thing you can do to protect the loft of your bag is to roll all the warm, moist air out ASAP in the morning.
Aside from that, to dry or not to dry will also depend on your own thermal budget. If your bag is marginal for the conditions you are in (whatever those conditions are), then you risk hypothermia by bringing dampness into your sleep system. If your bag has a large margin for error in those same conditions, it is generally safe (though still not sensible IMHO for the reasons Roger mentioned) to bring some damp clothes in with you. So the answer to "I walked all day in the rain through 40 degree weather and can I dry my windshirt in my bag?" may be "possibly", unless your bag is only warm down to 50, or you're running short on calories, or the night temps are plumetting and it will be a hard frost/snow by morning. Or, as is often the case where I hike, is that the first thing Victor has to do in the morning is to cross a deep river (or maybe it will still be raining in the morning), in which case it would be an utter waste of energy to attempt to dry his hiking clothes.