If you really want to remember or memorize some notes for a test, eat some chocolate while you study. Chocolate helps us stay alert so that's why you have to eat it. If you're feeling tired while you study, eat some oranges and drink water. Oranges help us hydrate. Remember that, bro.
Yeah, that has happened to me to. And as far as I've figured it out, it happens because your mind in multiple places at the same time. You may be sitting for studying but your mind may be wandering somewhere else, thinking something else. To overcome it, just make your mind, set a target what all you have to study in particular hour and then here you go! And yeah, keep a glass of water with you and whenever you feel tired or sleepy, take water. You'll feel fresh.