If you're groggy for more than a few minutes after waking up it is probably indicative of poor quality/amount of sleep. Not saying everyone is 100% at that point, but you should be able to focus on things after waking and going to class shortly thereafter.