As with so many legal matters, the answer is "it depends."
There are two kinds of Social Security disability benefits. SSDI (disability insurance) and SSI (supplemental security income).
Getting married would not stop SSDI. However, it may affect SSI benefits. SSI is a "needs based" program which provides monthly benefits if 1) you are disabled, and 2) if you have less than a certain amount of income (including gifts, dividends, etc) or assets.
In other words, SSI looks at the total amount of money you have coming into your household, including a spouses earnings (and assets). Getting married can very well cause SSI benefits to be stopped. But, it all depends on the amount of the assets and earnings.