CEC won’t make any difference, since it depends on HDMI ARC to work, and the OP has said they are using optical. Since Sonos doesn’t have any control over what comes out of an optical port (it is a one way signal, out only, and the TV has no knowledge if anything is actually connected to it), that means there’s something broken in the TV set.
I would certainly try a reboot of the TV’s OS by unplugging it from the wall for five minutes, then plugging it back in. And actually I’d double check after that for any new software updates to the TV.
But if that doesn’t resolve the issue, you’d need to contact LG’s customer service. Sonos has zero control over anything that comes to it via optical.