All my experience is with Medicaid in Pennsylvania. I think most of these things apply in other states too, but as suggested you should figure out your own state's rules. The big thing with getting Medicaid to cover a nursing home, is it has an asset spenddown requirement. That means your MIL will need to sell most assets to pay for the nursing home before Medicaid will cover her stay. This includes assets like second homes, investments, but also includes a primary home that is no longer required due to the nursing home stay (so if your MIL lives alone, you have to sell her house).
In Pennsylvania, a nursing home patient on Medicaid is allowed to have *some* income, and still qualify, but the income can't be allowed to build up in a bank account too much, or you'll risk losing the asset test. I doubt a particular exception exists that allows income to be used to pay for life insurance. And if the insurance policy has a cash value, that might fail the asset test (I don't know). But you should be aware that Medicaid can put a lien on your MIL estate, and receive the death benefit from a life insurance policy. See
here.