From the Museum of Cambridge website, on the subject of wigs, chamber pots, and the powder room:
..the vogue for powdered wigs started in France and England at the start of the 17th century and.. ..continued in the 17th and 18th centuries and visitors to the White Horse Inn (now the Museum building) would have used the space to store and re-powder their wigs and hair pieces with finely-ground starch and refresh them with essence of lavender or flower water…
Under wigs, hair would be cut very short or even shaved off and it is said that short natural hair decreased the number of head lice in the general population. Wigs were common until the 1770s but when a tax on hair powders was introduced in 1795 the vogue waned. The closets then became a place where the chamber pot was used and stored. We can now understand why ladies in polite society refer to lavatories as ‘powder’ rooms or ask to ‘powder their noses’!