This is what I did as part of my will, so that my family can recover my online life after I die. It would work the same for memory loss, coma etc.
Firstly, keep all of your logins, passwords and private details in a password manager with a master password (I use 1Password).
Second, encrypt your master password using this technique, which splits your secret into X parts: http://en.wikipedia.org/wiki/Shamir's_Secret_Sharing
You then give one part of the key to each of your trusted friends or family members. The best part is that this technique doesn't require all X parts to be recombined to get the key back; you can specify how many parts are needed. For example, I split my key into 11 parts, but only 8 are required to recover my master password.
Your friends don't have to do anything except keep their part of the key tucked away in their email archive.
There are plenty of implementations of this algorithm, I used this one: http://www.christophedavid.org/w/c/w.php/Calculators/ShamirSecretSharing