Medicine question.

Soni have been sleeping very poorly for about 8 months. I got prescribed trazodone for sleep and I just was curious to hear everyone’s experience and side affects if they had any. And I have0 idea on how long I should take it before I want to go to sleep