The "self-recharging" features of batteries is most noticeable in a car battery. In some cases you can crank the engine until the battery seems totally dead, then come back an hour later and crank it again. The higher the drain on the battery (a car's starter motor is an incredibly high-drain device!), the greater the effect.
To understand why this happens, it is helpful to understand what's going on inside the battery. Let's take the simplest zinc/carbon battery as an example. If you take a zinc rod and a carbon rod, connect them together with a wire, and then immerse the two rods in liquid sulfuric acid, you create a battery. Electrons will flow through the wire from the zinc rod to the carbon rod. Hydrogen gas builds up on the carbon rod, and over a fairly short period of time coats the majority of the carbon rod's surface. The layer of hydrogen gas coating the rod blocks the reaction occurring in the cell and the battery begins to look "dead". If you let the battery rest for awhile, the hydrogen gas dissipates and the battery "comes back to life".
In any battery, be it an alkaline battery found in a flashlight or a lead acid battery in a car, the same sort of thing can happen. Reaction products build up around the two poles of the battery and slow down the reaction. By letting the battery rest, you give the reaction products a chance to dissipate. The higher the drain on the battery, the faster the products build up, so batteries under high drain appear to recover more.
Many battery-operated appliances use two or four cells in series to create higher voltages. If one of the cells has a problem (for example, it does not dissipate reaction products as well as the other batteries), it can make all of the batteries appear to go dead. If you test the batteries individually, however, three of the four may be fine. If the batteries seem to go dead too quickly, testing all four batteries is a good idea. Throw out the bad one and re-use the other three.
For more information on batteries, see How Batteries Work.