You can inherit a dead relative's GOG account--if you have a court order
“In general, your GOG account and GOG content is not transferable,” GOG spokesperson Zuzanna Rybacka tells Ars. “However, if you can obtain a copy of a court order that specifically entitles someone to your GOG personal account, the digital content attached to it, taking into account the EULAs of specific games within it, and that specifically refers to your GOG username or at least email address used to create such an account, we’d do our best to make it happen.” While convincing a judge that your dead relative wanted you to have access to their GOG library might not always be the simplest process, a court order at least provides a viable path to getting such an account out of the legal limbo that usually enshrouds your digital goods after death.
Source: You can inherit a dead relative’s GOG account–if you have a court order