The Roku line of streaming devices has a lot of features that aren't necessarily obvious. Some can be incredibly useful, like built-in Bluetooth support for night owls, while others may not be everyone's cup of tea, like the recently added AI slop Roku channel. There's one function in particular that might be cutting your time in Roku City short without you even knowing it, but the fix is easy.
If your Roku has randomly been turning off without your permission, the culprit is likely the device's auto power saving feature. With this setting turned on, your Roku will enter a low power mode after 20 minutes when you're not streaming content or otherwise controlling it. In turn, it will try to turn off the TV it's connected to.
When this happens, you can wake up your Roku by powering on the TV, pressing a button on the Roku remote, controlling it from the mobile app or casting content via Airplay or apps like YouTube. However, you can also make it so your Roku never needs to be awakened in the first place.