What??? Factory reset is your solution?
That makes no sense. First thing I would do is check the WiFi signal. If it is weak, it will drain your battery quite rapidly as the phone is continuously trying to find/connect to it. If that's left on overnight with a weak WiFi connection, you can bet...