The 44-year-old actress practises regular yoga with her instructor Mandy Ingber to keep herself fit, reported People magazine.
"I don't think she ever worried about it. She got in great shape and worked incredibly hard for that sequence and it shows. I think people are going to watch it with their jaw on the ground," said "We're the Millers" director Rawson Marshall.
While Aniston has credited Ingber for helping her love her legs.
Ingber said that his three-day-a-week yoga programme keeps Aniston's body sculpted and toned.
The film will hit theatres on August 9.