We initiate the study of expansions of monoids in the class of two-sided restriction monoids and show that generalizations of the Birget-Rhodes prefix group expansion, despite the absence of involution, have rich structure close to that of respective relatively free inverse monoids.For a monoid M , we define F R R (M ) to be the freest two-sided restriction monoid generated by a bijective copy, M ′ , of the underlying set of M , such that the inclusion map ι : M → F R R (M ) is determined by a set of relations, R, so that ι is a premorphism which is weaker than a homomorphism. Our main result states that F R R (M ) can be constructed, by means of a partial action product construction, from M and the idempotent semilattice of F I R (M ), the free M ′ -generated inverse monoid subject to relations R. In particular, the semilattice of projections of F R R (M ) is isomorphic to the idempotent semilattice of F I R (M ). The result by Fountain, Gomes and Gould on the structure of the free two-sided restriction monoid is recovered as a special case of our result.We show that important properties of F R R (M ) are well agreed with suitable properties of M , such as being cancellative or embeddable into a group. We observe that if M is an inverse monoid, then F I s (M ), the free inverse monoid with respect to strong premorphisms, is isomorphic to the Lawson-Margolis-Steinberg generalized prefix expansion M pr . This gives a presentation of M pr and leads to a model for F R s (M ) in terms of the known model for M pr .