Abstract. We propose a new solution method for optimal stopping problems with random discounting for linear diffusions whose state space has a combination of natural, absorbing, or reflecting boundaries. The method uses a concave characterization of excessive functions for linear diffusions killed at a rate determined by a Markov additive functional and reduces the original problem to an undiscounted optimal stopping problem for a standard Brownian motion. The latter can be solved essentially by inspection. The necessary and sufficient conditions for the existence of an optimal stopping rule are proved when the reward function is continuous. The results are illustrated on examples.