When Marylanders visit Saratoga or just about any other major-league race track, they must feel sharp pangs of envy.Regular patrons of Bowie, Laurel and Pimlico hardly know what it is like to play the horses in an attractive, comfortable, efficient environment.

But this week Maryland's horseplayers were given a tantalizing hope for a better future. It came from a visitor here who has an intimate familiarity with the problems of Maryland racing.

John D. Schapiro, the president of Laurel Race Course, revealed that he and officials of Bowie had held preliminary discussions about a merger of the two tracks.

"The concept," Schapiro said today, "would be to close down one track to eliminate expenses and have more money to put into plant improvement: renovation of the grandstand, construction of new barns and general beautification."

The track to be closed presumably would be Bowie, an eyesore that only a wrecking ball and a bulldozer could beautify. Laurel already is the most pleasant of the state's thoroughbred tracks, and an infusion of capital could make it a genuinely pleasant track.

Of course, the notion of consolidation is nothing new in Maryland. In 1947, Pimlico and Laurel wanted to merge their operations; the state legislature turned them down. In 1954, after Schapiro had purchased Laurel, the two tracks tried again; the legislature again said no.

The mile tracks then attempted to strengthen their economic position by buying up the small tracks in the state, like Havre de Grace and Bel Air, but the legislature again thwarted their efforts. "As fast as we attempted to consolidate," Schapiro said, "the legislature expanded the dates for the other half-mile tracks and the harness tracks. It was an exercise in futility."

So the attitude of the legislature is crucial to anything that Laurel and Bowie might want to do, but the tracks may find that Annapolis is more responsive to their problems than it used to be. Gov. Harry Hughes showed his interest in the industry when he appointed a special seven-man committee to study and make recommendations about the future of racing in Maryland.

The committee has been working for three months, and it is expected to issue its final report in October. It could conceivably recommend a state takeover of the racing industry; it could also very well conclude that a Laurel-Bowie merger would be feasible and sensible.

The elimination of Bowie probably would not be fought in the legislature by local interests (as, say, a closing of Pimlico would be fiercely opposed by Baltimore representatives). Residents of Bowie often have lobbied against increases in the track's racing dates; they probably would not be sorry to see it go. So the merger should be politically possible.

Schapiro said he and Bowie officials plan to do nothing until the committee's report on Maryland racing is issued in the fall. Then, he said, "if consolidation were encouraged by the governor and the General Assembly, we will proceed. Our talks so far have been of a very general nature, but I don't anticipate any problems on our side. Since Bowie is a publicly held company, there may be some problems there, but I believe the Gibraltar Corp. owns 70 percent of Bowie's stock, enough to approve a consolidation."

Maryland's racing fans rarely have occasion to feel sympathy for the owners of the state's tracks, but this is one case in which bettors must hope fervently that the managements' efforts succeed.