What you are facing is nothing but exam related stress, which is quite common.
There is no pill for it, but you can follow these suggestions which can be helpful:
• Drink lots of water. At night, as you study, keep water at hand and keep sipping it regularly.
• Avoid tea and coffee .Yes caffeine will wake you up and give u a buzz right away but that effect will wear off quickly and actually make you more tired and sleepy than you were before .This is because it dehydrates the body.
• Diet is integral: Eat a rich healthy breakfast but have light dinner. If you feel hungry at night, eat fruits, salads only. Avoid junk food.
• Take 20-30 min nap during the day. It will help you to concentrate better.
• As you study, whenever you feel tired or sleepy or even stressed, take a minute to calm down. Breathe slowly- focus on your breath. (If you know yoga, you could practice those breathing exercises.)Concentrating on your breath can help you bring more oxygen to the brain which will wake the body up and can help you clear your mind and study better.