Get a retirement "visa" (permission to stay based on retirement, based on Non-O to avoid compulsory Thai insurance), for marriage your wife will have to be in Thailand for your extension (including a likely home visit).
Depending on how long she intends to stay initially, you could do marriage and then ditch it and go retirement when she heads back to the States.