The Senate spent 45 minutes this week debating the merits of the legislation, which was introduced at the urging of students from a dairy-producing area in western New York.
Before passing the bill, senators mulled the distinction between snacks and meals and whether other snacks were more deserving.
"What exactly are we defining as a snack?" asked Sen. Gustavo Rivera, a Democrat from the Bronx.
"I think it's self-explanatory. I mean, you have breakfast, lunch, and dinner, and then you have snacks," said the bill's Republican sponsor, Sen. Michael Ranzenhofer.
"Did you consider, say, the potato chip?" Rivera asked, posing the same question about raisins and pretzels. He then asked: "What if the pretzel was dipped in yogurt?"
Letterman and Stewart skewered the exchange on their shows, with Letterman playing video from the debate as part of a segment called "New York State: Your Tax Dollars at Work."
Stewart called the deliberations "maybe the best 40 minutes" of legislative debate ever.
"Even the fourth graders who brought this up in the first place are like, 'They're still talking about the state snack?'" Stewart said.
Some of the frivolity was staged as a parliamentary protest.
Sen. Liz Krueger, a Democrat from Manhattan, wrote on Facebook that she asked silly questions — including one about the bill's implications for lactose-intolerant New Yorkers — to criticize the priorities of Senate leaders. If Senate leaders "make us talk about yogurt, then that's what we'll talk about until they give us something better to do," she wrote.
New York is America's largest yogurt producer. Genesee County, home to the elementary students who suggested the bill, is home to dairy farms and yogurt plants that employ hundreds.
"We're a dairy farming community, and there's huge pride in that," said Casey Kosiorek, the local superintendent of schools. "This has been a chance for some true authentic learning."
Ranzenhofer, of Amherst, took the ribbing in stride.
"I'm sure every employee at the yogurt plant is gratified to see the attention," he said. "Even if it's at my expense."
There's no word on when the state Assembly may take up the bill.
Other states with official state snacks include Texas (chips and salsa), Illinois (popcorn) and South Carolina (boiled peanuts).