Yes, it can help you sleep. That is because it contains tryptophan, a sleep-inducing compound. The best way to have cocoa before bedtime is to drink cocoa milk. However, consume cocoa in moderation as it contains high levels of caffeine and disrupts your sleep cycle.