Write your privat keys and exchange's logins and password's on a couple pieces of papers and hide them in some secret and secure places.Explain to your family what crypto is and show how to do transactions. When you get strong feelings that the death is somewhere around ,tell to your family where you keep the papers.
It will be difficult to implement in practice. In order for the family to be able to use your coins and tokens after death, they need to know how to use them, and this is a rather large amount of knowledge. Most likely, they will be forced to seek help from other people. And this, again, is a matter of trust.