I guess within my habits of smoking regularly (especially in the evenings), it does work as a sleep aid for me, and when I have had insomnia, I have been able to ditch my benzo hypnotics when weed was available. Also, if I've been smoking for extensive periods of time, when I stop, I might have trouble falling asleep for a few nights.
However, I rarely take a hit and then go to sleep - I find that it's a waste of a high, and it also only really works with heavy indica smoke, or if you're drunk/really baked already/really tired. I usually smoke, and then around 1 hour to 1 and a half, I hit the hay.