The answer to this may depend on whether you are disabled or not. It also depends on whether you are older or younger than 65 years old. You may be able to put the money in a special needs trust and use it to supplement your income. Any leftover funds after you pass away would need to go back to Medicaid.
You should contact an elder lawyer to discuss this further.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on since each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.
Inheritances can have great impact on public benefits. As Ellen Victor said, your age will greatly determine how you would need to address this. It is critical that you consult with an Elder Law / Special Needs attorney to discuss your options.
I agree with the previous answers. I would also like to add that if you are receiving SS and medicaid, the inherited money will not affect those benefits. However, the inherited money will certainly affect your food stamps and if you are receiving any state based medical benefits, those will be affected as well. Resources for SS purposes only matter if you are receiving SSI, if you are receiving either retirement benefits or disability insurnace benefits, they will be unaffected by an inheritance.
Based upon the facts as you have stated them, I suspect that you are using SSI, Medicaid, and Food Stamps. Your inheritance may significantly impact your continuing eligibility for these benefits. It is essential that you attempt to have the underlying document (will or trust) looked at to see if it establishes a special needs trust for your benefit and if it does not it would be a wise idea to look into what options you have to modify the underlying document to establish such a trust for your benefit.