I've read two commentaries on canon law, talked to a religious major superior of men and a canonist experienced in handling the cases for dispensations from the obligations of religious vows and the priesthood. My canonist friend immediately wanted to know the period of time involved. Before the first (1917) Code of law, canonists used to speak of the possibility of a married couple, without other family responsibilities, separating and joining religious orders. In that era the possibility of one having earlier been a priest would be most unlikely, since dispensations from the obligations of priesthood would have been very rare.
When I talked to the major religious superior, he was not nearly so sure the Holy See would not accept a petition of a priest who left after 1980. He could give no certain answers. But an existing valid marriage would certainly complicate matters. My canonist friend said a bishop or religious superior could submit a petition in the case you propose, but it's anyone's guess as to the decision. The religious superior thought the granting of such a petition might depend on the bishop who submitted it. Is his judgment particularly respected by the Holy See? The canonist also thought the grounds for reinstatement would have to be the need of the Church—not the man's personal good. And the Holy See would have to be assured this man would be placed in a ministry where he would be acceptable to the People of God. The way to return would certainly not be made easy.
I'm not going to speculate further on whether a former sister, married to an inactive priest, would be allowed to return to religious life. I think the superior of a sisters' religious order could speak to that better than I can. But I do not think it too likely if the priest is still alive.