UV Unwrap Order Of Operations (Cloth Sim)
Although the end result should theoretically be the same, you should probably unwrap the base mesh prior to running the simulation.

It will be much easier to get a clean UV map with a proper layout from a plain undeformed base mesh then from a wrinkled and highly subdivided result of the physics simulation.

However, unless you apply the result of the simulation, you can always sweep the timeline backwards at any time, and return to a point before the first frame of the simulation, where the mesh is still intact.

So you can theoretically still UV Map a mesh if you already ran a simulation, as long as you can still revert to the base mesh shape.