Hi. Coffee is a stimulant, the way it keeps your brain awake, it also likes to keep all your organs awake and active, including the heart. Increased dose of coffee will cause palpitations and anxiety and sometimes sweating and may feel like a panic attack. As the concentrations in the body go down you may feel lethargic and need another dose again. I believe thats what's happening with you.
Next Steps
decrease the amount and stop consuming black coffee. Try other methods of distracting yourself from exam stress.
Health Tips
please don't self medicate.