This paper presents a convex optimization approach to control the density distribution of autonomous mobile agents (single or multiple) in a stochastic environment with two control modes: ON and OFF. The main new characteristic distinguishing this model from standard Markov decision models is the existence of the ON control mode and its observed actions. During the ON mode, the instantaneous outcome of one of the actions of the ON mode is measured and a decision is made to whether this action is taken or not based on this new observation. If this action is not taken, the OFF mode is activated where a transition occurs based on a predetermined set of transitional probabilities, without making any additional observations. In this decision-making model, an agent acts autonomously according to an ON/OFF decision policy, and the discrete probability distribution for the agent's state evolves according to a discrete-time Markov chain that is a linear function of the stochastic environment and the ON/OFF decision policy. The relevant policy synthesis is formulated as a convex optimization problem where safety and convergence constraints are imposed on the resulting Markov matrix.