Remember the legal fine print in the T&C that says that the miles do not belong to you, they belong to the airline. You actually do not have a legal right to them.
I seem to recall seeing something on Air Canada saying that they will basically, in respect of your loss and bereavement, graciously permit transfer of miles to an heir for just a token fee of 2 cents per mile (barf barf!).
However, airlines do vary in their actual policies. Air Canada's policy is essentially confiscatory, since the miles aren't even worth 2 cents each. This is why, as another poster mentioned, some people have been known to leave their password and say "Don't tell anybody I'm dead until you burn all the miles."
There have been divorce cases where people have claimed miles as marital property to be divided. I don't really know how they have been decided. I'm pretty sure that an airline can just laugh and say "Oh, you have a court order telling us to transfer miles from Mr. Flyertalk to Mrs. Flyertalk. Go spit in the water, you can't make us do a damn thing, the miles don't belong to Mr. Flyertalk, they belong to us." (Most likely the court will say that if the miles are worth $5000, Mrs. Flyertalk gets an extra $2500 from some other asset.)
Probably the "use 'em before the airline finds out" is the best strategy.