To do this, you pick a bed time, say 10 pm and a wake up time, say 7 am. Now every night no matter what you go to bed at 10 and stay there until 7 even if you cant sleep. Then at 7 you get up and open the shades and step outside. Most of the problem is our bodies are deprived of sunlight therefore messing up our sleep schedules. As long as you stick to the schedule you will start to fall asleep and wake up naturally every night.
I have tried this and it did work, but due to other medical issues I need the assistance sometimes of a sleeping pill, but it does work.