This paper provides necessary conditions of optimality, in the form of a maximum principle, for optimal control problems of switching systems. Dynamics of the constituent processes take the form of stochastic differential equations with control terms in the drift and diffusion coefficients. The restrictions on the transitions or switches between operating modes, are described by collections of ...