If the idea of disconnecting the battery and leaving it overnight is to purge and reset the ECM, you don't need to leave it overnight. Two things you need to know. First is the simplest way to reset the ECM is take off the driver side back wheel and get into the battery compartment and then remove both sides of the battery cables. When that's done I want you to find a short piece of heavy copper wire and I want you to span the negative cable and the positive cables...THE CABLES NOW OFF the battery. Do not get anywhere near the battery with any part of this bridging operation. If you Bridge the positive and the negative battery cables when they're off the battery it will immediately ground the ECM. The second thing, if you are using a piggyback system interacting with your ECM, that will be most likely wiped out as well. An example of that would be VEC, so if you are using one be prepared to have to reestablish that as well. You can put the battery cables back on again as the car is reset back to factory fresh having dumped all the pattern data that you've provided it or it has felt it required. Now I'm taking it for granted if you have an engine light you've been reading that as well. Lastly week 12 volt batteries are notorious for creating just the condition you were talking about. If that battery is older than 5 years, now is the time to replace it.