I used to find this to be a very common ocutrrence as well. It got fixed by accident.
My Internet Modem was trashed by my 5 year old thinking it needed a drink. I was without Internet access for 3 days. During that time I could still use my Apple TV linked by wifi and it stayed on the whole time.
Then I got the new fibre modem and it has worked fine. Maybe turning off the internet will help diagnose the issue.
Also if you think the wifi is an issue. You could use the etherent connection between your mac and the Apple TV.
To see if this is the issue.
This wifi trouble shooting article may help
The Apple TV can communicate via Ethernet or Wifi (Airport)
If you turn off Airport on your computer and connect via ethernet and it all works it is an issue with your wifi.
If it still does the Turn on home sharing it is not a wifi issue
It may well be you have to turn off Home Sharing on Computer and Apple TV
Re enable it and see if it works. It did for me.