If you couldn't already guess from the name, yes, these masks were often taken after the subject had passed but sometimes would be taken just before or in the prime of their life. Just like how we hang photos on our walls today, these masks were often used as decorations. Before the age of photography, life and death masks were cast to preserve the likeliness of notable people. Portraits were a practice of documentation during this time but nothing was as precise as a physical cast of their face.
Some may not know this but Princeton University's Firestone Library is home to the largest collection of its kind. The collection houses the faces of Walt Whitman, John Keats, Jonathan Swift and nearly a hundred more. Laurence Hutton the former owner of the collection was a notable theater critic and literary editor in the late 1800s. There was no one more fascinated by this practice than him. Decades were spent scouring curiosity shops and museums around the world in search of new items to add to his collection. Hutton was a longtime associate of Princeton University and donated his collection to the University back in 1897.
Unfortunately the Laurence Hutton Collection of Life and Death Masks is off-limits to casual library visitors, however, photos of the collection have been posted online so that everyone and anyone can view the morbid collection. You can view the collection Here