In New Jersey, as in most states, unless your Property Settlement Agreement states otherwise, parties can go back into court to get support orders modified based on changed circumstances. In my "agreement," which I felt was extorted from me, I "agreed" to pay a fixed rate of alimony for a term of 8 years, then it ends, and we agreed that neither of us could go back to court to have it changed based on changed circumstances. So in my situation, I would get to keep my lottery winnings and my parasite ex-wife would get none of it.
In Jersey they also look at the "marital lifestyle," and the support award is supposed to allow both parties to lead the same "marital lifestyle" as before the divorce. Fat chance when only one of them had much of a paying job during the marriage. So again, assuming the parties could go to court for a modification based on changed circumstances, if the wife was already living the "marital lifestyle," then she wouldn't be entitled to a piece of the lottery winnings (but your kids would, so child support would increase). But if she wasn't living the "marital lifestyle," then the lottery winnings would be changed circumstances and she could get a piece of it to get her up to the "marital lifestyle."
The unfairness of all this, aside from the fact that alimony even exists in the first place, is that when a man gets laid off or changes jobs and gets paid less, or retires, 9 out of 10 times the courts won't allow a decrease in alimony and will impute income to the man, or will say he is deliberately underemployed, capable of earning more, and won't want to "disadvantage" the ex-wife because the man now has a lower paying job, or has retired.
That is the main reason I "agreed" to pay alimony for 8 years at a fixed extortionate rate. I felt it was better than a court maybe awarding my parasite ex-wife lifetime alimony, and then me getting hauled into court every few years if my salary increased, or if I won a lottery or came into an inheritance.