Medicaid is a means-tested program. As I have explained elsewhere, you only qualify if you are too "poor" to pay for long-term care in a nursing home. In terms of income, it is not too hard to qualify as being "too poor" since nursing home care can cost around $10,000 a month or $120,000 per year.
But there is an asset test as well. A single person will not qualify if they have more than $2,000 in assets. There is a larger exemption for married couples, but still, this creates a problem. What happens when one spouse dies?
One often-overlooked strategy for dealing with this problem is the testamentary trust. According to the federal rules that ultimately govern Medicaid, a trust set up by a spouse in the spouse's will cannot be treated as totally available for Medicaid. The trust's own provisions have to be respected.
So you could create a trust for your spouse and provide in it that your trustee can provide anything your spouse needs except what Medicaid would provide. This type of trust, called a "supplemental needs" trust, will ordinarily only work for Medicaid if it is set up by a non-spouse. You can set a special needs trust up for your child without using your will. But it only works for a spouse if a will is used.
This arrangement is particularly recommended when one spouse is already in a nursing home. If the other spouse dies, the spouse in the nursing home wil automatically become ineligible. The spouse in the community can avoid this by executing a will with a testamentary trust provision.
But even if neither spouse needs a nursing home yet, the use of testamentary trusts can still protect substantial assets. The testamentary trust can provide that whatever is not used for the care of the surviving spouse can then be distributed to the children.
My special wrinkle on this is to use the will to exercise a power of appointment built into your revocable trust. The power is only exercised if your spouse survives. If your spouse survives you, the assets in your revocable trust are transfered into a testamentary trust, where they are protected from being spent down for nursing care. If your spouse does not survive (that is, if you die first), the power is not exercised, and the assets can be just distributed out of the revocable trust in the normal way.