You are eligible to claim the "Defender Bonus":
- Once every 21 hours
- If you have at least 1 Pokémon in a gym at the time.
One you have claimed your bonus, you will need to wait 21 hours before claiming it again.
You can gain additional bonuses if you have 1 Pokémon in other gyms as well (you can assign 1 Pokémon to multiple gyms, but you can't have multiple Pokémon in the same gym), which will increase your reward. However, this still is only available once every 21 hours, from the time you last collected your "Defender Bonus".
- Adding Pokémon to new gyms does not reset the clock
- Losing a Gym does not reset the clock
- Changing the time on your phone does not reset the clock[citation needed], as all user information is stored on the servers.
Therefore, the only "strategy" I can suggest is to
- Maintain your gym, so you can maintain your defender bonus
- After the countdown ends, add Pokémon to as many gyms as you can, then claim your bonus, before you lose the gym.
The Old Defender bonus was replaced with an automatic reward system, granting a player 1 coin/10 minutes a Pokémon was active in a gym (raids will place a gym "on hold", and Pokémon will not claim coins in this period, or lose health over time); to a maximum of 50 coins per day, that resets at midnight, and is automatically claimed when Pokémon are kicked out a gym.
This means that if you have 1 Pokémon in a gym for 8 hours and 20 minutes (500 minutes) you will gain the max 50 coins. Any other Pokémon that are in gyms in the same 24-hr period that you claimed this reward will no longer reward you with coins.
From personal experience: I don't think there's a cooldown. I had beaten a gym some days ago and the game was pretty laggy. When I was finally able to place a pokemon, the gym was already another color.
No official information though, sorry.
EDIT: The game updated since I posted this answer. The answer is no longer correct! New answer is: It is not possible to steal someone's gym now, battle winners have priority.
Best Answer
A Silph Road Reddit post indicates a 30 minute fixed timer. The timer starts on the first berry and resets after 30 minutes. That is, if you feed 5 berries, wait 15 minutes, feed 5 berries, wait 15 minutes, the timer resets and you may feed 10 berries immediately.
There is another restriction on feeding up to 10 pokemon within a 30 minute rolling window.