Matrix equations in Markov modulated Brownian motion: theoretical properties and numerical solution