There are a couple different things that can be going on.
It could be that you are over stressing and it is just making you feel sick. This can happen in anticipation of a test coming up just like how some people feel sick before giving a speech or going on stage for a performance.
It could be that you are too focused on studying. If you focus too much on studying, then you can lose sight of other things, such as eating or drinking regularly. Keep in mind that extensive studying uses more brain power than other activities. This means that your brain, which burns most of the calories you intake daily anyway, is working that much harder. Regular study breaks with snacks are essential for preparing for anything. You should also remember to stay hydrated! Try to stay away from highly caffeinated drinks because those will dehydrate you and make it more difficult to absorb the information.
If you try these things and it does not seem to help, you may want to look into learning or performance disorders. Things like ADD or testing anxiety can make it difficult to study. Testing anxiety can cause stress for weeks prior to an important test, but it can also cause panic attacks, painful muscle tension, and headaches. If you are worried about this, try taking this inventory: http://www.collegesuccess1.com/InstructorManual4thEd/Tests/TestAnxietyInventory.pdf
If your anxiety level is high, you may want to go and be tested by a psychologist or doctor, they may be able to help you with testing accommodations for tests and give you more specific strategies for dealing with your specific issues.
The best thing to do is to make sure that you take breaks between studying. Our brains don't process information well if you do not give it the time in between studying. It is essential for memory formation that you take breaks.