Sleeping script

Is there a script to make your first person character sleep and automaticly change the skybox? Silly me, ofcourse there is, just could somebody help me with it?

Create new skybox & ambient light to your liking. Then change skybox material and ambient light like (pseudo code):

if(is_character_sleeping)
{
RenderSettings.skybox = your_night_sky; 
RenderSettings.ambientLight = your_sky_ight; 
}