As like many other portable electronics, Chromebooks suffered from rather limited operating time. The battery is enough to keep the device running for several hours. But to increase the longevity even further, Chrome OS will automatically put the device to sleep.
While there is a positive benefit behind it, some users might prefer to keep the device running normally. One case is to make sure the alarm you set will wake you up on schedule.
Whatever your reasoning is, this is how you can turn off the automatic sleep feature on your Chromebook.
1. First, open your Chromebook and click the clock icon at the bottom right corner.

2. After that, click Settings which is symboled by a gear icon.

3. The Settings window will open. Select Device on the menu on the left side.

4. Now, go to Power.

5. Set the setting for While charging and While on battery to be Keep display on or Turn off display. The latter will still keep the device and apps running, but the screen is turned off to save battery.

6. You may also turn off the Sleep when lid is closed, however, this is optional.

And there you have it. Your Chromebook won’t enter to sleep even when it’s not in use.
Keeping the tablet/laptop turned on for hours won’t damage the device or the battery as they are designed to sustain a treatment like that. However, expect more charging when your Chromebook is running longer.