Effects of Heat on Lithium-Ion Batteries

Unsurprisingly, lithium-ion batteries are susceptible to the elements, and high temperature extremes can vastly decrease the life of a battery. It is never pleasant when a laptop battery finally dies and one is faced with either spending a significant amount of money for a new battery or solely relying on an external power source. A few things can help prevent this from happening prematurely.
When a laptop (or similar device's) battery is kept plugged in, it is exposed to elevated temperatures. Simply unplugging the unit from the power source once the battery is charged can help extend the battery's life. Additionally, if a battery is easily accessible, one can remove the battery when running a unit off external power -- this will prevent the battery's exposure to prolonged high temperatures. An added benefit of this practice is the prevention of overheating and possible fires, with the detractor that a user's unsaved work could be lost in the event of a power failure. Another practice that may help is to allow some breathing room underneath a laptop. When operating a unit on a heat-trapping element such as a pillow, blanket, or even one's own body, consider placing a small object beneath the unit, or slightly elevating it, to improve air flow and reduce battery exposure to high temperatures.

How to Prolong Lithium-based Batteries
^To learn more about the science behind batteries check out Battery University.