Memories. If it is nightmares that have occurred and that you anticipate, prazosin can be very effective. Consciously and deliberately rehearsing a different, more positive ending to the event - just before falling asleep - can script a revision and as a result a more restful sleep. Telling your account, and emdr can also be of benefit. Early propanolol and Clonidine can disallow memory consolidation.
Seek counseling. If you are having problems sleeping after a traumatic event, then you may be suffering from either acute stress disorder or (if it has gone on several months) post-traumatic stress disorder. This needs to be treated by a competent psychiatrist and/or counselor. Treatment may involve both medication and counseling.