In general that sounds fine as a concept. Just some things to be aware of …
Keep bonuses small ( else pcs will never leave. Not to mention entire communities would be squatting there all the time too)
i, personally, wouldn’t increase the bonus the longer you were there but still have a notable time requirement to get even the base bonus. Like a whole day of prayer. It keeps time as the resource cost to get the bonus
consider if they need offerings during the prayer, this might vary based on the type of deity
think of your pcs, are any explicitly not religious? You’d be making them decide between role play vs missing out on a bonus that other players are getting ( mind you if they knew this would be a feature before character creation then this is not an issue)
similiar to the above are any pcs exceptionally devoted to one deity such that they would pray at another deity altar, again RP vs mechanical bonus. Or there is maybe the person who is gets an extra bonus at own deity altar but none at others. But again if knowing before character creation then more wiggle room here