It is used colloquially in the way you suggest, usually in the context that you have been under pressure, stress, from work or for other reasons. You take a break and do something relaxing to unwind.
The literal meaning refers to a spring in a clock, or string, rope, etc being wound or unwound from a bobbin, capstan, etc; when wound there is tension in the spring or rope, which is released when it is unwound.