Fasting can bring on mood swings when you are not used to it yet. When committing to intermittent fasting for the first time, you may experience some hunger pains and dehydration. which will get you annoyed.
But they are all temporary. Your body will adjust to the change and it will start burning up fat to supply you with the energy you need.
If the feeling of irritation and anger is too much for you, decrease the amount of time you fast until you can go longer in the future. Instead of trying for a 16-hour fast the first time around, go with a 12-hour one where you are sleeping for eight hours of it.