I had the same problem when streaming Home Movies to Apple TV from a Mac.
I found a fix: Under Settings ~ Security & Privacy ~ Firewall ~ Advanced is a setting that automatically logs you out after a specified period of activity.
Mine was set to 60 minutes.