<Setter Property="Command" Value="{Binding DataContext.TheCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type namespace:MyMenuItem}}}"/>
Alternatively, give the child VM a reference to the parent, or to the command that it needs to expose.