I've been on this before for sleep and I assume the doctor also hoped the weight gain side effect would be good for me (I was skinny at the time).
It does work for sleep, at least it did for me. The problem is it gives you the strangest dreams, and they are really really vivid. That might sound cool and all but some of them can be pretty disturbing or bizarre, and to me they put me in the "bad trip" mind set. So while I am sleeping I'm spending all my dream time in an anxiety ridden head space. Not all of the dreams are bad, I could just be having the odd ones by nature but some left a lasting (and bad) impression. Just sayin'
I've used it as an "abort" aid as well, it's useful for coming down off other drugs in that respect. I found it more effective for inducing sleep than benzos, and its almost on-par with the z-drugs (well, ambien at least).
For sleep the trick is this: Less is more. I figured out pretty quickly that half of my prescribed dose worked just as good as an entire pill. I wouldn't suggest this if you're using it for anything else (anti-depressant qualities) but for sleep I found it was the way to go. Like z-drugs take right before bed, because when it kicks in (15-20 minutes) you're out like a light for at least 6 hours IME.
One last thing: If using this as a sleep aid I don't suggest using it every day when possible. It does have an anti-depressant effect and will change your head space. Its subtle and hard to put your finger on, but it's there (note: I don't feel I was on it long enough at a time to feel the full effects of it in that respect).
It does make you gain weight...or eat at least.
I put on 20 pounds and kept it on, so it was useful for that. It gives you what I can only describe as the super munchies, a deadly combination for the fridge if you're a pot head. :D
Oh, and now a days I use this as a "last line" sleep aid because I don't like the dreams all that much.
I try to rotate sleep aids as well if I'm having to take them for longer than a few days. I suggest having something else on hand (OTC or prescribed) like ambien or DPH. Like all things if you start using this drug every night for sleep it will stop begin effective, and unlike other drugs upping the dose doesn't work.