I'm sorry to hear that you're having this issue.
The most likely culprit would be the optical cable. I'd recommend swapping it out with a different cable to see if that solves the problem.
The other option, before you run out and get a cable is to call your cable/sat company and ask if they can reset, refresh or if there's a firmware update available for your box. Often times they can initialize a reset or an update while you're on the phone. This may fix the problem, and often, does.
(It's the simple stuff, sometimes!)
Periodically, seemingly at random, the sound will go out while watching television. I can turn the tv off then turn it back on, and it will work again, though sometimes I have to take some action (like change a channel or go to the DVR menu) for the sound to start up again.
My receiver doesn't have HDMI, so I run HDMI from the box to the tv, then optical audio from the tv to the receiver.
I've begun some diagnosis, and I think it's a problem between the tv and the receiver. Once when the sound went out, I switched the tv over to its internal speaker and it worked fine, which indicates to me that there's not a problem with the signal coming from the cable box via HDMI. My next step is probably to try a new optical cable.
Any ideas of how to further troubleshoot before looking into a warranty claim?