There are never any restrictions on how the proceeds are spent. You can pay for funeral costs, medical bills, debts, or literally anything else you want.