In 1816, King Frederick William III of Prussia made his cabinet pass a decree that stated all Lutheran churches in the areas under Prussian rule had to observe the last Sunday before Advent as a "general celebration in memorial of the deceased". Other churches outside of Prussia followed, eventually, as well.
In the United States, some Protestant churches celebrate this service of remembrance as "Totenfest." It often coincides with celebration of All Saints Day.
Totensonntag is a protected holiday in all German states. The holiday laws of all federal states, with the exception of Hamburg, have special provisions, classifying Totensonntag either as a memorial day or a "silent day" which implies special restrictions. Depending on the state, music may not be played in public venues or only at certain hours, and dancing is forbidden as well (German: Tanzverbot).