If you want to get sick over night then your best option is also a very unpleasant and potentially dangerous option: Food poisoning.
All you'd need to do is eat some food that is either uncooked or hasn't been preserved properly and that has a high bacteria count, and you will be suffering from nausea, vomiting, and diarrhea in a matter of hours.
As I mentioned, the experience can be pretty unpleasant, and could even end you up in hospital if your system can't handle the amount of bacteria you consume or if a pathogen is particularly potent or resistant to treatment.
Most people try to make themselves sick because they want to miss school. I can't explain how dumb an idea like that is!
You ask any adult, and they will tell you that they had days when they didn't want to go to school too. But do they remember those days or think about them often? Nope.
It sucks to go to school and have a bad day, but you're not actually solving your problem by making yourself ill. Instead you will make your body more stressed out, and less able to cope with school problems.
So my advice would be to forget about making yourself sick overnight and focus on finding someone you can trust and hare your concerns about school with.
It might be a parent, a friend, a teach, even a Q&A site! But I promise once you start sharing your problem and tackling them - you will find school a lot easier to stomach!