This post caught my eye initially and having a back ground in psychology I smiled and wanted to ask a couple of questions.
Having my head bitten off a few times on this forum by people much more knowledgeable than I will ever be on any subject I didn't.
Then after a sleepless night I decided to register with a different identity and just post.
I have always been a bad sleeper and I have chosen the wrong profession

One of the posters above mentioned having flown till 6 am and then getting messed up for the next day. I know that feeling well.
Having suffered through 2 periods of more than 1 year each with sleep less than 4 hrs. per day (documented) this is a touchy subject for me.
The first period was when I was cpt. on a medium jet. About half way through the period a friend did a line check on me and said: ok....it is safe and up to standard, but this is not how I know you. Either you call in sick or I will ground you.
He is still one of my best friends.
After a couple of months I flew again. I switched to a wide body and flying longer distances. Slowly it came back and sleep became less and less. This time I pulled the plug, but still I ended up in the hospital. Quite a bit of research later part of the problem seems to be melatonin production.
Since then we have done quite a bit of research on sleeping and rest, etc. (we=neurologist/psychiatrist/myself)
Ok, already a bit too long....
So-couple of quick points:
1-know your limits and also keep in mind you are subjective, not objective. (it might be difficult to judge yourself)
Play it on the safe side, even though your body can probably take more of a beating than you can imagine

2-alcohol, sex, drugs (legal or illegal) are temporary fixes.
See the comment about zopiclone above (imovane-brand name) Great little pill with a bit of a bitter after taste

, but basically doesn't work any more after about 3 wks. or so. Then it becomes a psychological fix. If you do end up taking them once in a while: take half. Most cases this is enough. (don't get me wrong. Imovane is one of the more 'modern' sleeping pills. One big advantage is that it also allows you to have deep sleep which some of the 'older' pills don't. Also it doesn't stay in your system as long, but it is not meant for long term usage)
3-a sleeping problem for more than 6 months: get help
There are some physical causes, but the major cause for not being able to sleep is stress.
As a poster above wrote: "sleep hygiene" is the first step (see google) (well....solving whatever causes the stress is first whenever possible AND legal- fyi: throwing wives out of airplanes is not!)
2nd is meditation/prayer (yes prayer falls in the same category

) or sports/exercise.
Imagine your body as a bucket and stress as water. When the bucket is full 1 drop can make it over flow.
The above 2 don't take away the stress, but basically make the bucket bigger and helps to give you a bit more time to figure out the cause of your stress or allow you to cope with a higher level of stress.
If all of the above fails: sleep clinic, but I bet you 99% won't be needing that.
(And hopefully 0.1% will find the above useful.)