Once the headsail is furled you can then turn the boat into wind, (use the motor to keep the boat heading upwind) tighten the main sheet.
Release the main halyard. If the halyard is through a rope jam cleat, please put the halyard around the winch and tension it slightly before releasing the jam cleat otherwise you will break the jam cleat.
Again, be careful that the mainsail slides down the mast and does not catch on the lazy-jacks. Always watch the sail as it comes down and assist it where necessary.
If you have reefs in the mainsail, just remember that they will still be tied the next time you put the sail up and will need to be untied if the main is to go all the way up.