This is a common question that is posed to attorneys and likely to judges as well. It used to be that a stay at home mom getting divorced was told by her lawyer "do not go get a job, let's force this guy to pay you maintenance (alimony) and support you for the rest of your life". Well, times have changed.
This is a reprint from a NY Times article by Paul Sullivan in the "Weath Matters" column on July 27, 2018:
Looming End of Alimony Write Off has Divorce Lawyers Telling Clients to Act Fast