It looks like T-Mobile  (TMUS) U.S. CEO John Legere has occasion to wear the company onesies he's been obsessively tweeting about recently, as shares of his carrier turned in the strongest quarter by far among the Big Four U.S. telecoms. 

T-Mobile's 12.3% gain in the first quarter easily topped rivals AT&T (T) , Verizon (VZ) and Sprint (S) . T-Mobile's aggressive market share gains have helped the stock, but the potential for consolidation may also be providing the carrier with a boost. 

"The fact that they remain really confident in their net adds and market share gains despite Verizon's unlimited plans certainly helps investor confidence," said Macquarie analyst Amy Yong. For the quarter so far, which ends on Friday, Sprint was up more than 3%, while AT&T dropped 2.3% and Verizon fell nearly 8.7% as it joined the unlimited plan free-for-all and as reports suggested it could bid for Charter Communications (CHTR) . 

AT&T and Verizon face the prospect of aggressive price competition from T-Mobile and Sprint.

The telecoms should benefit from Congress's move to strike down rules on broadband privacy that give the carriers more freedom to market customer data. AT&T and Verizon both stand to benefit from the move. AT&T is in the process of buying Time Warner (TWX) and has acquired DirecTV, and will be able to market the content from the cable networks and pay-TV systems more effectively. Likewise, Verizon is closing on its purchase of Yahoo! (YHOO) . Together with AOL, Verizon is building an online data marketing platform.

All of the telecoms will gain clarity once the FCC discloses the results of a recently concluded government auction of wireless spectrum licenses. AT&T, T-Mobile and Verizon could be on the hook for billions of dollars, depending on how much wireless spectrum they purchase. 

T-Mobile may benefit from expectations that the Trump administration would be more open to a merger with a rival telecom such as Sprint or even a cable operator like Comcast (CMCSA) or Charter.

Comcast is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells CMCSALearn more now.

Charter was reported to be among the potential deal targets for Verizon, and gained nearly 14% in the quarter. John Malone's Liberty Broadband (LBRDA)  was a beneficiary of the reports of a Verizon purchase of Charter. Malone has been an advocate of cable consolidation, and Liberty Broadband is primarily a holding company for Charter shares. Liberty Broadband stock gained 17.4% in the first quarter.

Wireless tower operators SBA Communications (SBAC) gained 16.6% and American Tower (AMT) increased 15%.

Wells Fargo analyst Jennifer Fritzsche upgraded the entire tower sector in March. Spending should increase after AT&T scored a major contract to deploy a nationwide broadband network for police, fire departments and other emergency workers.

Meanwhile, Fritzsche noted that T-Mobile is likely to spend on infrastructure as it aggressively attacks the wireless market. Legere's telecom is likely a winning bidder in a government spectrum auction and could spend on towers to build out its wireless capacity.

Crown Castle (CCI) , which is Wells Fargo's top pick in the sector, gained close to 9% in the first quarter.

More from Stocks

Tesla: What Are Wall Street's Best Analysts Saying Now?

Tesla: What Are Wall Street's Best Analysts Saying Now?

In Trump Era, Managing JPMorgan Is As Unpredictable As a Midnight Tweet

In Trump Era, Managing JPMorgan Is As Unpredictable As a Midnight Tweet

Wall Street, European Stocks Edge Lower Ahead of Trump-Putin Summit in Helsinki

Wall Street, European Stocks Edge Lower Ahead of Trump-Putin Summit in Helsinki

Xiaomi Has Much to Prove After a Tepid IPO

Xiaomi Has Much to Prove After a Tepid IPO

Trump-Putin Showdown Is a Sideshow. It's All About Netflix Earnings

Trump-Putin Showdown Is a Sideshow. It's All About Netflix Earnings