Senate Majority Leader Robert C. Byrd said yesterday he is increasingly optmistic" about passage of the hard-fought natural gas deregulation compromise to be taken up in the Senate tomorrow.

But he conceded that neither the proponents nor opponents had a majority on their side in the Senate at this point. The number of uncommitted senators is still "fairly substantial," he said.

The Carter administration is waging its most intense lobbying effort since Panama Canal treaties fight, calling the gas measure the centerpiece of its energy program. The complex compromise, boiled down from Carter's original proposals over the past 17 months, provides for the complete deregulation of gas prices by 1985.

Byrd said debate may last a week to 10 days. In between, there will be efforts to send the compromise back to committee Byrd said - an eventuality that would mean "no bill at all" - and a possible filibuster effort. Byrd said the prospects of cutting off any filibuster with cloture are good.

"Seventeen months ago I said this would be a ball game that would go into extra innings. We are now in those extra innings," he said.

"But my personal contacts with at least 70 senators, and my knowledge of the uncommitted bloc and the identity of those senators making up the uncommitted bloc, leave me increasingly optimistic."

The Carter administration picked up more support yesterday, announcing endorsements of the compromise from the U.S. Conference of Mayors, the National Conference of State Legislators and the Solar Energy Industries Association.

Energy Department spokesman Jim Bishop said the White House also received a supporting telegram from 16 independent natural gas producers in Texas.

In his regular Saturday news conference, Byrd also cautioned the White House against any campaign of vetoing legislation just to "demonstrate a get-tough attitude" toward Congress.

"There may be those at the White House" who advocate this, but it would be "a horrible mistake" if the president embarked on such a course, he said.

The White House is reportedly considering vetoes of several pieces of legislation, including the public works bill, following the veto of the defense authorization measure. The veto was sustained last week.