The answer will depend on the E-bike battery. Some battery may take more time than other batteries to get fully charged. But as a matter of fact, leaving it overnight is not a healthy practice for the battery. So, my answer does not to leave the battery overnight. You can use an electric timer to set a specified period of time after which the current will be cut off Some of the examples are here