Spoiler for solution

We have two positions - up and down. Lets say in his minds he marks them positions P1 and P2, regardless which is which (solely for the convinience of the solution).

Move 1. He takes 2 diagonally opposite mugs and flips them to P1.

Move 2. He takes 2 adjacent mugs and flips them to P1 again. That means that he certainly took 1 of the mugs he turned in move 1, and 1 which he didn't turn in move 1. Therefore, he now has 3 mugs in P1. If the 4th mug was originally in P1, he would win already. If not, then that means it is in P2. Which leads him to:

Move 3. He takes 2 diagonally opposite mugs. If one of them is in P2, he flips it and he wins. If both are in P1, he flips just one of them to P2. Now he certainly has 2 pairs of adjacent mugs in the same positions (P1 next to P1 and P2 next to P2).

Move 4. He takes 2 adjacent mugs. If they are in the same position, he flips them both around and he wins. If they are in different positions, then he flips them both around anyway. Now he knows that the pairs of diagonally opposite mugs are in the same positions, but every two adjacent mugs have different positions. That makes it easy in the next move:

Move 5. He takes either pair of diagonally opposite mugs and flips them both around.

Move 1. He takes 2 diagonally opposite mugs and flips them to P1.

Move 2. He takes 2 adjacent mugs and flips them to P1 again. That means that he certainly took 1 of the mugs he turned in move 1, and 1 which he didn't turn in move 1. Therefore, he now has 3 mugs in P1. If the 4th mug was originally in P1, he would win already. If not, then that means it is in P2. Which leads him to:

Move 3. He takes 2 diagonally opposite mugs. If one of them is in P2, he flips it and he wins. If both are in P1, he flips just one of them to P2. Now he certainly has 2 pairs of adjacent mugs in the same positions (P1 next to P1 and P2 next to P2).

Move 4. He takes 2 adjacent mugs. If they are in the same position, he flips them both around and he wins. If they are in different positions, then he flips them both around anyway. Now he knows that the pairs of diagonally opposite mugs are in the same positions, but every two adjacent mugs have different positions. That makes it easy in the next move:

Move 5. He takes either pair of diagonally opposite mugs and flips them both around.