The proximate cause of the sour smell that clean laundry sometimes acquires is uncontrolled bacterial growth. The bacteria release waste products that cause the sour smell; these bacteria are not quite the same germs that cause body odor, but the principle is the same. If your laundry is sour, you'll need to re-wash it to remove the smell. But don't just go through your usual routine -- make some adjustments to prevent a second round of stink.
Raise the Temperature
The hotter the water, the more odor-causing bacteria you kill. Start by rewashing your laundry in the hottest water temperature your clothes can stand. Use your regular detergent for this round. Your rinse cycle temperature can be set at hot, warm or cold as you prefer -- it's the wash temperature that is most critical.
Check Your Washer
Sometimes it's your washer that's the problem. Mildew, a fungus, can form in the moisture left behind in a washing machine and can impart a sour or musty odor to your clothes. Front-loading machines in particular are prone to this problem because suds stick to the front gasket and allow mildew fungus to breed. To rid your laundry basin of its mildew smell, run an empty washer cycle using the hottest water and some bleach. Afterward, leave the door open and let your washing machine air-dry.
Try an Additive
Add a cup of white vinegar to the rinse cycle to help deodorize your laundry. Vinegar is a versatile cleanser that can help kill the bacteria in your clothing. Alternatively, use a cup of baking soda along with your regular detergent to neutralize the sour odor. You can also add borax to your laundry to neutralize odors; follow package directions. A powdered sodium borate, borax dissolves in water and acts as a disinfecting agent.
To prevent sour-smelling laundry in the future, do not leave wet laundry sitting in the machine for more than an hour or so, as this provides an ideal environment for odor-causing bacteria to grow. Do not overload or overstuff the basin, either -- overcrowding prevents thorough washing and rinsing. You may want to run a second rinse cycle as an additional preventive measure.