Are you talking about a low-tech hammer stop that is just open-ended? Those will waterlog over time as the air gets absorbed. They should be mounted on the top of a Tee so as to collect any air that may be in the water stream.
The better hammer stops have a piston with a pre-charged, closed air reservoir that are not prone to waterlogging so the air supply need not be replenished by accumulating air. They can and should be installed as you say, with an elbow so as to not accumulate air, thereby keeping the O-ring seal on the piston lubricated.