The nearest neighbor method is often used as a heuristic for different problems. Sometimes the method gives an effective approximation algorithm as well. You could employ it here as well. Here's a skeleton for a heuristic method that maintains a stack $S$ of vertices representing the resulting simple path. Let $F$ be a set containing forbidden vertices, that is, vertices that have already been used in our final path. $F$ should be a data structure supporting fast insertion and lookup, such as a hash table or even a bitvector.
- Pick a start node $s_0 \in M$ and let $S := \{s_0\}$, and $F = \emptyset$.
- Choose a successor $s_i$ to $\text{top}(S)$, and try to find a path $s_{i-1} \leadsto s_i$ avoiding vertices in $F$. If a path is found, insert the vertices on the path $s_{i-1} \leadsto s_i$ to $F$.
- Repeat step 2 until no successor can be found
For a more concrete implementation, consider the following:
- Let $\text{Per}_M(G)$ be the marked periphery, that is, the marked vertices with highest eccentricity. Pick the start node $s_0$ such that $s_0 \in \text{Per}_M(G)$.
- Using BFS, find the closest vertex to $\text{top}(S)$, where $S$ is the stack maintaining the path. Push the successor to the stack $S$. If a vertex $v$ is forbidden, i.e. $v \in F$, then the BFS won't visit it.
- Repeat step 2 until no successor can be found.
I'll argue for the concrete implementation above:
- You can think of picking the start vertex $s_0$ from the "convex hull" of $M$. Roughly, the idea is that you only need to expand the path into one direction, thus maximizing the "freedom of movement".
- BFS seems like the simplest idea; alternatively one could experiment with other search methods, such as bidirectional search or randomized DFS. A randomized DFS might be a bad choice when there's only a few elements in $F$, then it's possible it'll produce very long paths between two marked vertices. On the other hand, running a randomized DFS -based heuristic resembles the idea of random restarts, which has been very effective in say SAT/CSP solvers or local search methods.
If you are able to find any additional properties of your input graphs and/or $M$, it might very well help you in tuning this heuristic.