Trying to understand the relationship between Tesla CEO Elon Musk and the SEC takes a lot of head-scratching. Virtually any other CEO, irritated with the regulator, would suppress any expression. Why stir up a hornet's nest? And you don't see the agency often in a war of words with a chief executive.

U.S. District Judge Alison Nathan found herself in the middle when the SEC ultimately brought suit--and used a keen sense of emotional intelligence and legal understanding for a great approach to a resolution.

When Musk tweeted last year about taking Tesla private, claiming that funding was secured when it wasn't, the SEC came down hard. Musk lost the chairman office, although he remained as chief executive. Both he and the company faced $20 million fines. Finally, Tesla's board was supposed to clear any comments Musk made about potentially material company information.

And then Musk kept tweaking the agency's nose in public. When he made a remark on Twitter in February about Tesla making about 500,000 cars in 2019, and then added a few hours later that he meant an annualized production rate by the end of the year, the SEC asked a court to hold Musk in contempt.

"I long thought the commission was acting like a playground bully and Mr. Musk was acting like a petulant child," Thomas Gorman, a partner at international law firm Dorsey Whitney and a former SEC official, told me in a phone interview. "I have great respect for the SEC and for what Mr. Musk has done and built, but this seems to be over the top. They're arguing about one tweet of a few words. Both sides have an incredible amount to lose, and no one had anything to win there."

If the SEC lost, its credibility--crucial for its role in regulating corporations and markets--would be damaged. If Musk lost, Tesla, which is identified so closely with him, could take a big hit in investor confidence. Supposedly, there had been no change in the stock price after Musk tweeted, but what he did was technically contrary to the solution previously agreed to. Judge Nathan knew that.

"I don't think anyone could win," Gorman said. Instead, Nathan's suggestion was simple and effective: "My call to action is for everyone to take a deep breath, put your reasonableness pants on, and work this out."

Put a little differently, she told both sides to grow up and find a reasonable solution, like grownups are supposed to. As Gorman said, her response was essentially, "If you leave this to me, you're not going to like what I do."

"I've seen judges do this for years," Gorman said. "It was a particularly great move for this."

The suggestion was keen and, hopefully, effective. If both sides can go off and come to an agreement, the entire matter drops and each side will have won by not losing. Let's hope that Musk, Tesla, and the SEC can demonstrate that their wardrobes possess a pair of reasonableness pants.