HSA accounts should have a stated beneficiary.   Upon the death of an account owner,  if the beneficiary is the spouse, the ownership of the HSA transfers to the spouse.    

If the beneficiary is not the account owner's spouse, the HSA ceases to be an HSA on the date of the owner's death and the fair market value of the account becomes income to the beneficiary.

If the beneficiary is the owner's estate, the fair market value of the HSA account is reported as taxable income on the account holder's final tax return.