They're not Medieval and their origin had nothing to do with the plague although people did realize that avoiding direct contact during an epidemic was a good thing.