Add a dryer sheet to the dryer when drying your clothes. The dryer sheet coats the clothes with similar chemicals and therefore, prevents static electricity.
Add a fabric softener to your washer instead of using a dryer sheet. Pour an appropriate amount to the fabric soften dispenser in your washer, often found on top of the agitator on a top-loading machine or in a pull out tray in a front-loading machine. The fabric softener releases during the rinse cycle, coating the same chemicals to the clothes to prevent static electricity in the dryer.
Wait for your washer to start the last rinse cycle. Time it so you know how long to wait for future loads. Pour 1/4 cup of white vinegar evenly around your clothes and close the lid. The vinegar will disperse, coating the clothes with a similar chemical to help reduce static electricity. Do this instead of using a fabric sheet or fabric softener.