Wawrinka secured a 6-4, 6-7(7), 6-3 victory to reach the quarter-finals but not before he had attempted to pacify top seed Medvedev, who also made a gesture to suggest the crowd were crazy.
Russian Medvedev lost his composure after going down 2-0 in the deciding set and sent his racket bouncing off the court, leading to some fans expressing their displeasure by booing.
The 26-year-old world number four responded by giving the crowd two thumbs down and went on to mock their jeering, which only grew louder as more spectators joined in.
The chair umpire and Wawrinka attempted to calm the crowd but Medvedev was not done, making a gesture as if to say that the fans had lost their minds, before play resumed.
Wawrinka played down the incident after his first win over a top-10 player since the 2020 Paris Masters against Andrey Rublev.
“We always have some great battles,” the Swiss said in his on-court interview. “He is at the top of the rankings. One of the best players and nicest person outside of the court, so it is always great to play against each other.”