It is best to clean the carpet after the stretching is done. There are two reasons
First: When the carpet is wet, I could easily tear the carpet with the power stretcher. There is 300-400 lbs. of pressure applied by the machine.
Second: If the carpet has big bubbles or folds, it is better to make it flat, so the cleaner could get deeper into the fibers resulting a better cleaning job.