A laptop power supply can supply a limited amount of power. Conceivably, then, when the computer is running, some of the power must be diverted to the processor and other components, leaving less to charge the battery. (Power usage is roughly 10 to 30 watts, or maybe more if you have a graphics card. In my case, my charger is rated for 65 watts.) Why doesn't my laptop battery charge while the laptop is in use? is an example of an extreme case. So it's plausible that this would affect charging speed.
So do laptops in fact charge significantly faster when turned off or asleep (while plugged into a sufficient power supply)?