Make the sleep timer on a tablet dependent on whether it's being charged or not
There is no such feature on Android natively.

However, there are quite a few "automation" type apps that can do this for you.  Some of the better known ones are Tasker, AutomateIt, Locale and Llama.  All of these allow you to define a trigger (e.g. "charger plugged in" in your case) and set up various actions such as toggling settings.

Keep in mind that most of these apps require excessive permissions in order to be able to change system settings (and some toggles even require root.)

Also, some manufacturer UI overlays and custom ROMs allow you to set up profiles with different settings.  Switching these profiles is either a manual process, or does not provide such granularity in configuration as the automation apps.