When "entertaining" domestic animals one must only look at what these animals want to do and by that I mean what comes naturally.
Kelsie is correct in her ideas. Chickens (their wild cousins or free range birds) will spend a good portion of their day searching for food. So providing and environment in which scratching is encouraged is a great way to relieve boredom. So hay/straw, leaves, untreated grass clipping, pine shavings etc. in the run and like Kelsie said throw a little scratch around and they will spend quite some time scratching looking for tidbits.
The roosts and ladder idea is an excellent one. Chickens will spend time preening and seem to like to do so elevated a bit.
I have several old ladders propped around my run. The hens love to sit and preen or take a noon day nap. The birds lower in the pecking order seem to love them the most as it is a way to get away from the "bullies". I got my ladders for free, found them sitting out with peoples trash.
I have banana plants and this time of year I cut some of the leaves off and throw into the run. It keeps my hens busy as they peck at them and eventually consume them. I buy the $2 pumpkins at Aldi's. One will last about a week, keeps the hens busy. My tomatoes are still producing but most have blight so into the chicken run they go.
Make sure they have several places to dust bath.
So as you can see there are numerous ways to keep hens from beating their little beaks against the fence in sheer boredom. Just takes a little thought/imagination as to what it is that comes naturally to them. Many things can be done for free or at very little expense.