Randomized methods for control and optimization become highly popular [1, 2]. They often exploit modern versions of Monte Carlo technique, based on Markov Chain Monte Carlo (MCMC) approach [3, 4]. The examples of such MCMC methods as Hit-and-Run and Shake-and-Bake applied to various control and optimization problems are provided in [5, 6]. However the results are unsatisfactory for ”bad” sets, such as level sets of ill-posed functions. The idea of the present paper is to exploit the technique, developed for interiorpoint methods of convex optimization [7], and to combine it with MCMC algorithms. Suppose a convex set Q and corresponding barrier F(x) are given. The first problem is to generate points xi approximately uniformly distributed in Q. The method uses Hit-and-Run and local geometry of Q at the point xi provided by Hessian of F(xi). The second problem is to minimize a linear function (c x) over Q. We construct Dikin’s ellipsoid centered at xi and choose a random direction uniformly distributed in this ellipsoid. The stepsize in this direction is made according to boundary oracle [5, 6]. Such approach is well tailored for sets Q defined by linear matrix inequalities (LMI), which are widely used in control and optimization [8]. The results of numerical simulation are promising.