Earlier this week, the world learned that beloved Hollywood couple Jennifer Garner, 43, and Ben Affleck, 42, have decided to split—ten years and one day after their wedding. If you read the tabloids, you’ll know the breakup has been coming for awhile. Indeed, the couple has been separated for months, and it seems clear that the timing of the divorce filing, initiated by Garner, was not a coincidence.

According to a well-connected Tinseltown insider, “If this has been in the works for a while, and it has, they have lawyers advising them to do it now because of California’s divorce law.” That law, according to certified family law practitioner Donald P. Schweitzer in Pasadena, California, is the California Family Code Section 4336(a), which presumes that a ten-year-long marriage is a long-term marriage. That affects the amount and the length of spousal support. Essentially, the lesser-earning spouse can petition the courts for more alimony money or support of longer duration.

Another possibility is that Affleck and Garner have a prenuptial agreement with an added monetary benefit that kicked in after their ten-year anniversary. (Affleck and Garner did not respond to Fortune’s requests for comment.)

Though hard prenup figures are tough to find, a 2013 survey of divorce lawyers by the American Academy of Matrimonial Lawyers found a 63% increase in prenuptial agreements in recent years. Some also expect the recent Supreme Court ruling on same-sex marriages will lead to a spike in prenuptial agreements among gay couples, who have often been together for years and have established a significant estate. Not surprisingly, all the attorneys Fortune spoke to said that the wealthier the clients, the more likely they are to have prenups.

Marilyn Chinitz, partner at Blank Rome LLP, worked on the Tom Cruise and Katie Holmes divorce and says, “In a prenup, there can also be an agreement that, upon divorce, the higher-earning spouse will give the other a certain amount of settlement money for each year of marriage—I have seen cases range from $5,000 a year to $100,000 per year. The settlement is dependent on the assets of the more wealthy spouse. In the case of Jen and Ben, they both came into the agreement with plenty and earned more.”

In all cases, says Chinitz, “It’s important to know what your partner has—or does not have.” It’s also important to educate yourself about what is not in a prenup, she says. “Issues regarding children or child support—family court will determine amount of child support and visitation in the case of a divorce,” says Chinitz.

Mela Garber, a tax principal at Anchin in New York, has handled many prenuptial arrangements for wealthy clients and advises her clients perform due diligence well before their wedding date. “Don’t hide anything,” says Garber. “The top two reasons that prenups don’t hold up in court is because of hidden assets and a last-minute signing of the agreement.” Keep in mind that it does take time to collect all the financial documents, hire lawyers and reach an agreement. Garber advises clients to give themselves about six months to complete a prenup.

Many prenup pitfalls are easily avoided, says Chinitz, noting that the most common slip-ups are “stupid mistakes in the document being created and filed.” Even something very routine, such as failing to get a document notarized, puts your prenup at risk of being thrown out of court, she says. Chinitz advises reviewing all of your agreement carefully, and perhaps having a separate attorney to look it over it to ensure all your paperwork is in order.

The basic rules of prenups are the same for Hollywood multimillionaires as they are for small business owners, says Chinitz. “I tell all my clients: You have to be smart and savvy and know what’s going on with your assets before and during your marriage,” she says. “Be invested—in yourself, and in your financial security.”