– A federal judge Tuesday dismissed bedding retailer Sleepy’s LLC’s eight-year-old defamation and breach of contract lawsuit against rival Select Comfort Corp. of Plymouth, which makes Sleep Number adjustable beds.

U.S. District Judge Joanna Seybert in Central Islip, N.Y., said Select Comfort did not violate a 2005 contract that let Sleepy’s sell Select Comfort’s Personal Preference line of beds, while Select Comfort sold its Core line in its own stores.

Sleepy’s sued after hiring undercover “secret” shoppers to visit Select Comfort stores to help determine why sales of Personal Preference beds were proving disappointing.

It said the shoppers reported how Select Comfort salespeople would make disparaging remarks about the beds, and that Sleepy’s offered inferior sales terms and would not honor warranties.

But the judge said Sleepy’s read the contract’s non-disparagement clause too broadly, and that the record was “devoid of evidence suggesting that Select Comfort, as a whole, acted in bad faith.”

She also said Sleepy’s, based in Hicksville, N.Y., was “substantially motivated” by the desire to bolster a possible lawsuit against Select Comfort in eliciting negative comments, and therefore “consented” to them.

Sleepy’s and its lawyers did not immediately respond to requests for comment. Select Comfort and its lawyers did not immediately respond to similar requests.

Seybert ruled seven months after the federal appeals court in New York revived the lawsuit, which a different judge had dismissed in 2012 after a non-jury trial.