Often emotional stress leads to sleep issues. You might be thinking about your problems while trying to sleep. This is usually counter-productive because sleep comes only to a relaxed mind.
About the Sleeping pills, you could have gone back to the doctor and discussed with him/her and changed the dose or the medication.
Next Steps
1.Counselling for learning to manage stress better and emotional regulation to avoid highs and lows.
2.Natural methods of inducing sleep like pranayma before dinner, soft music, reading a boring book, eat at least 2 hrs before sleeping, yoga or exercising on daily basis.
Maintain a Sleep diary which will give deeper insight into the causes of sleeplessness.
3. Medication if nothing else works.
Health Tips
Avoid alcohol, tea and coffee before sleeping. Learn to compartmentalise stress to the beginning of the day.