Beer may help you sleep, but it will, in my experience, leave you feeling groggy the next day and impair your performance more than you would have suffered through lack of sleep. There are many good reasons to drink beer, but to help you sleep and improve performance ain't one of 'em.
Like you mentioned, that in your experience it leave you groggy, personally I think this depends on the person and how their body reacts to beer. I've found that one beer (500 ml) at least an hour or two before sleep doesn't leave me groggy in the morning at all. If I drank beer right before sleep that probably wouldn't work well.