As new optimus pointed out:
System Settings - More - Developers Options - Stay Awake (screen will never sleep while charging).
For some users the developer option is hidden. If you don't see that in your MORE menu, then look for About Device (under MORE), scroll all the way down, and look for Build Number. Tap it multiple times, after 7th or so taps, it will activate developer options and they will appear under MORE menu.