Your question only gives sketchy facts, but let me try to explain as best I can: Getting married won't affect your SSDI benefit, which gives you Medicare. However, your wife's income will be counted in calculating whether you still remain eligible for SSI, which automatically qualifies your for Medicaid in most states. You may want to talk to your social security office or an elder law attorney.
If you found this answer helpful, please consider clicking on the thumbs up symbol at the bottom.
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. A lawyer experienced in the subject area and licensed to practice in the jurisdiction should be consulted for legal advice.
Generally, getting married will not affect your Social Security Disability status because it is not a welfare program. However, SSI and Medicaid are welfare programs. If you get married your spouse's income would be deemed available for you and could disqualify you for SSI and Medicaid.