Even if it is, you may not like the result. Sonos’ product strength is synchronised multi-room audio. To achieve this they introduce a slight delay when a source starts to play, to ensure other speakers can also play in sync with the first speaker. Even when a single speaker is used, the delay exists. The line-in on a Play:5 will have that delay, so the audio will lag behind the video. This lack of lip-sync will be very off-putting. A home theatre device such as Ray, Beam or Arc minimises the delay, and can have the One SL’s bonded as surrounds.
If you can find an optical input to line level output converter it should work, with the delay though.
Does the TV have a headphone output, you could try a 3.5 male, male cable on that.
You must select Line-in in the Sonos app to get the sound to the Fives. However as other have said there will be a delay causing lip sync issue. On the other hand lip-sync is not an issue if you are sending the audio to a room where the monitor is not seen. That application works well to send a sporting audio to another room. However, you need an Arc, Beam 2 or Ray to create a Sonos HT.
Note also that the Sonos Five is a stereo device, and could not process a Dolby Digital signal if you could get it sent to it. Using the Five restricts your ability to send anything other than stereo from your TV set, and the Ones cannot be set up as surround speakers.