It literally refers to the physical act of stretching your limbs, which can be done to ease stiffness or tension. However, the idiom is used figuratively to describe taking a break from routine or work to enjoy some freedom and activity.
Here are some examples:
* "After working all day, I'm ready to go home and stretch my arms and legs."
* "We've been stuck inside all day, it's time to stretch our arms and legs and go for a walk."
The idiom is often used in situations where someone feels restricted or confined, and they want to break free and do something enjoyable and liberating.