Z906 speakers have a few inputs to begin with. Two optical, coaxial, stereo RCA/phono and direct 6 channel (3.5mm inputs), if I'm not mistaken.
If you need another input for a third PC or device, then I suppose it depends what the other device is. There is a coaxial input, so another PC could make use of that, but you'd need a converter to convert optical to coaxial. I think coaxial outputs on motherboards are pretty rare now. Otherwise, you could use an optical splitter or the stereo RCA input.
Certainly you will be using optical from the PS4, but when it comes to the second PC and possibly third, there are things to consider when deciding which PC uses the direct 5.1 input and which uses optical.
When connecting 5.1 speakers to a PC via optical, to get proper 5.1, the signal needs to be encoded with Dolby Digital or DTS in order to work. When connecting Z906 to PS4, the 5.1 works because console games have Dolby Digital already encoded. PC games for the most part do not, so real time 5.1 encoders are needed. This is where Dolby Digital Live and DTS Connect come in, but to get either or those, you'd need a sound card. Majority of motherboards that have optical, don't come with those 5.1 encoding features. Without Dolby or DTS, optical is only capable of stereo.
So, it depends whether you'll have one gaming PC and the other/s doing something else and don't necessarily need 5.1, or whether they are all to be used for gaming and you want 5.1 to work as intended from all PCs.
Main gaming PC would be best connected via direct 6 channel 3.5mm connections, especially if you don't have a sound card and are just using motherboard output. The other/s connected via optical, would work fine from optical out on a motherboard, whether their purpose is for gaming or something else; but without a sound card to encode with Dolby or DTS, you would get stereo up mixed to all speakers.
If you're using one of the PCs as a media centre to play films for example, then you can get proper 5.1 via motherboard optical, if the films being played have Dolby/DTS audio tracks. That can be passed via optical as 5.1 as it's only games where real time 5.1 encoding is needed.