I usually sleep pretty well, but I cannot tell you what I am doing right. I do occasionally wake up when the koalas are going for it hammer and tong in the tree outside our bedroom window, or when one of the kids is having nightmares.
A few years back I had trouble sleeping, mainly because I couldn't get my brain to switch off, which is usually the main cause of insomnia. Work decided to put some of us through one of those well being courses and we learnt meditation, which I have to say helped me turn off (though some days I have trouble switching back on again). Though I haven't done any meditation for a while, I think I have better control of the switch.
The best way to describe the brain processes is that your brain collects a lot of information through the day and it needs to process it. When you are busy the brain stores the information for processing later. Ever woke up and remembered you had forgotten to do something? Its the processing that keeps you awake. Reading, surfing the net etc delays the processing. Drinking alcohol (responsibly of course) makes you relax and helps process the info. So process that information!
Sorry that was an engineer's understanding of psychology