I have heard that in medieval times people would sew themselves into their clothes to retain heat. Is there any truth to this and if so where was this commonly done?
I have never heard this from a scholarly source, or even a pop history book, so I'm not sure where it comes from. To be honest, it doesn't make much sense.
In the early Middle Ages, this wasn't even really a possibility, because the basic element of clothing - the tunic - didn't actually have any fastenings to sew shut. The tunic was loose and unfitted, and slipped on over the head. Clothing that was fitted to the torso, requiring openings in the sides or front in order to be able to slip on past the shoulders, first appeared in the form of the bliaut in late 10th and early 11th century France (as I describe in this past answer). The bliaut faded out of regular use in favor of the tunic again, and the fitted cote (the gown you likely think of on a stereotypical medieval woman, though we also call the corresponding men's garment a cote) came into fashion in the late 13th century, where it hung on and replaced the tunic.
Even in the parts of the Middle Ages where the cote was being worn, there was no reason to sew clothing shut for warmth (though if it was sewn shut as a method of fastening in general, as I have seen suggested occasionally, it would have been easy enough to snip open at the end of the day). Whether laced or buttoned, body heat lost through the closure would be minimal, and as described in these previous answers about winter clothing in the 14th century, layering was how people dealt with the cold. This would naturally lead to any closures being covered with another layer of wool.