It’s doubtful that the sleep problems are due to side effects from medications you took 4 years ago. It’s more likely that you are unable to sleep because you are thinking and thinking and thinking about things and don’t know how to turn it off. It’s also possible that you are so anxious about not being able to sleep that you keep yourself awake thinking about it.
I just did a quick search of books that might be helpful. There are many that offer suggestions about how to stop over-thinking and ease into sleep. Reading may be a place to start.
If you have access to a counselor, it would probably be helpful to make an appointment for a few sessions. A counselor can help you figure out what you, personally, need to do to get an appropriate amount of sleep every night. If you can’t see a counselor, do consider joining one of the forums here at PsychCentral. People from all over the world offer each other suggestions and support.
I wish you well.