This paper considers an M/G/1 queue in which service time distributions in each busy period change according to a finite state Markov chain, embedded at the arrival instants of customers. It is assumed that this Markov chain has an upper triangular transition matrix. Applying the regenerative cycle approach with respect to a busy period, we obtain the Laplace–Stieltjes transform, i.e., LST, of the stationary waiting time distribution in a certain parametric form. We give a procedure to determine those parameters. Some detailed calculations and numerical results are presented as well.