Sir, Im a doctor..
The reason they make you talkative and friendly, is because of the decrease in firing of certain parts of your nervous system. They actually act similarly to alcohol (the reason why diazepam is given when you are going through withdrawals from alcohol), when you get drunk you are talkative, and friendly and not shy, this is because your brain is "slowed down" so you dont have the connections between parts of your brain inhibiting your actions.
I agree there are better drugs for insomnia, and what works for some insomnias doesent always work for others. personally 12.5mg of quetiapine works wonders for me when I need to sleep.