© Dynamic Publishers, Inc.This paper is devoted to optimal control problem of stochastic switching systems. Dynamics of this processes governed by stochastic differential equations with control terms in the drift and diffusion coefficients. Necessary conditions for optimality of described systems with the restrictions in each interval are obtained. The constraints on the transitions are described by the set of functional inclusions. Ekeland's variational principle are applied to prove maximum principle in general form.