Length of sleep time
Think this review from Nature can answer your question. A brief summary  ( with slight simplification):

The ascending activating system (that is responsible for wakefulness) has two branches:

The first one ascends to the thalamus and activates the thalamic relay neurons - these transmit information to the cortex. They get their main input form two acetylcholine producing group of cells:  the pedunculo-
pontine and laterodorsal tegmental nuclei (PPT/LDT). These two group of cells are also the source of main input for reticular nucleus of the thalamus.


  The neurons in the PPT/LDT fire most rapidly during wakefulness and rapid eye movement (REM) sleep, which is the stage accompanied by cortical
  activation, loss of muscle tone in the body and active dreams


The second branch, directly activates neurons in the hypothalamus, basal forebrain (BF) and cortex, bypassing the thalamus. This pathway has origins in monoaminergic neurons in the upper brainstem, caudal hypothalamus, as well as the noradrenergic locus coeruleus (LC), serotoninergic dorsal (DR) and median raphe nuclei, dopaminergic ventral periaqueductal grey matter and histaminergic tuberomammillary neurons. Input from this pathway to the cortex is extended /augmented by the lateral hypothalamic peptidergic neurons (that contain melanin-concentrating hormone (MCH) or orexin/hypocretin), and BF neurons(that produce acetylcholine or GABA).

Sleep is promoted by the so called VLPO (ventrolateral preoptic nucleus).
The VLPO send outputs to major group of cells of the arousal system in the hypothalamus and brainstem. 


  The VLPO neurons are primarily active during sleep, and contain the inhibitory neurotransmitters, galanin and GABA.
  The VLPO also receives afferents from each of the major
  monoaminergic systems. Both noradrenaline and serotonin inhibit
  VLPO neurons. The latter do not have histamine receptors, but the
  tuberomammillary neurons also contain GABA, which is inhibitory
  to VLPO neurons, as well as several other potentially inhibitory pep
  tides, such as galanin and endomorphin. Therefore, the VLPO can
  be inhibited by the very arousal systems that it inhibits during sleep.




As you can see in the quote from the paper these two systems can mutually inhibit each other and basically work as a seesaw or 'flip-flop switch'. In this system activity in one  subsystem shuts down the inhibition from the other subsystem and disinhibits its own action (selfreinforcing loop). The transition from one state to the other is relatively fast. Orexin plays important role in stabilizing the switch in one position or the other.



Regulation pf sleep:

Homeostatic:
It is unclear how homeaostatic regulation of sleep work, yet it has been proposed, that adenosine accumulation in the brain may signal for 'need for sleep'. The extended wakefulness causes the exhaustion of brain glycogen reserves and depletion of ATP levels. As ATP is degraded to ADP, AMP and eventually adenosine, extracellular adenosine levels rise in some parts of the brain including the BF. 


  In addition, adenosine might disinhibit the  VLPO via presynaptic A1 receptors by reducing inhibitory GABAergic inputs.


This implies that during sleep ATP and energy sources are regenerated and free adenosine levels drop, thus inhibition of VLPO might take place again. 
Also it is important to note that the amount of sleep we need is proportional to the time we spend awake.

Circadian regulation:

It is known that humans have quite precise :circadian rhythm:


  The suprachiasmatic nucleus (SCN) serves as the brain’s ‘master
  clock’. Neurons in the SCN fire in a 24-hour cycle that is driven by a
  transcriptional–translational loop, which persists even when the neurons are dissociated in cell culture.


The SCN has moderate output to the VLPO or orexin neurons, but it has more important projections to the adjacent subparaventricular zone (SPZ) and the dorsomedial nucleus of the hypothalamus (DMH).


  The SPZ also has relatively limited projections to the VLPO, orexin
  neurons and other components of the wake-sleep-regulatory system. However, a major target is the DMH. This region receives inputs from many more neurons in the SPZ than the SCN, so the SPZ is in a position to amplify the output of the SCN. (...) The DMH is one of the largest sources of input to the VLPO and orexin neurons and is crucial for conveying SCN influence to the wake–sleep-regulatory system. The DMH projection to the VLPO comes largely from GABA-containing neurons (that is, those that promote wakefulness by inhibiting sleep), and the projection to the LHA originates from neurons containing glutamate and thyrotropin-releasing hormone (which should presumably be excitatory and promote wakefulness).


So as you can see our circadian rhythm as direct control over our sleep-wake cycle, and that the SCN can heavily promote awakening through SPZ and DMH.

Thorough review and details can be found in the article I linked at the beginning, I only tried to select key information to provide a (not so ) brief summary. We only sleep about 7-8 hours normally because this is enough for homeostatic regeneration and our circadian rhythm promotes wakefulness in the morning (this is quite simplified).

Based on their abstract these limited access papers might also be useful (unfortunately I do not have full access to them right now):


http://www.eurekaselect.com/87813/article
http://www.sciencedirect.com/science/article/pii/S0074774210930018
http://www.sciencedirect.com/science/article/pii/S0896627315001312