Yes. I've been doing exactly that for over 6 years with eZee batteries, NiMh, Li-ion manganese and Li-polymer.
Watch out, dont unplug a Sparta or Koga NiMh battery at night. Sparta and Koga e-bikes fitted with NiMh batteries are clever: the reason they last 5-7 years in a great many cases is because they automatically drop a resistor in to the charge circuit about every 7th charge. This drops the voltage the charger reads, thus fooling the charger into thinking the battery is not yet fully charged, so the charger keeps forcing power in. The good people in Appeldoorn call it a stabilisation charge.
Most e-bike batteries are made up of lots of small cells, one of which will age and fail before the others. Un-checked, this weak cell will 'cap' the capacity of all the other fit cells and the E-bike range will drop off at about two years old. The Sparta/Koga stabilisation system gives the failing cell a fizz and passion for life again.
Some Sparta and Koga owners forget this and unplug ther charger at night. Over the years their range drops off. They come to us for a new battery. Here's the lovely thing: we plug their e-bike into the Ebike Service Centre computer terminal and run the Dutch manufacturer's diagnostics program. It reports say 40% of original capacity. It also reports that the time the battery has been connected to a charger is say 12% of its life. The unexpected (by Accell too I think) thing is that the battery in question can recover if its owner changes their habit and keeps the charger plugged in when they're not using the bike. As you might imagine they are very pleased that they dont need to buy a new battery.
In our experience batteries that have been connected to their charger for about 30% of their life (or more) last 5-7 years, and show over 90% of original capacity right up to their dieing day.