It depends on what the purpose of the spell your were casting, whether you were grounded or not, and what you have done prior to taking the bath. If your intent was not to feel drained and dizzy, then obviously something went wrong.
I have no clue as to the purpose of your spell, but always keep in mind that when working with magic, it is paramount to be grounded and to do so with a clear, focused mind. If you do not, then you risk your spell taking a turn for the worst (which is what I think may have happened with you). Another possibility is if you were out in really hot weather (summertime so it seems likely) and/or laboring more than what your body is accustomed to, then being in a hot bath can actually drain more than it replenishes. If there is steam it can limit the amount of oxygen that you are able to get into your bloodstream which can cause problems such as you described. (I have had this problem when taking showers after a physically demanding day) Besides just the reduced oxygen, if your body is already hot from either weather or labor, increasing its heat even more with a hot bath can be detrimental to the relaxing purpose of a bath.
Should it have been a grounding problem, I would suggest meditation before spellcasting when plausible to clear and focus your mind, and to help you ground yourself so the energy for the spell doesn't drain you as much.
If it is because of the weather/overworked problem, then try taking a slightly chill shower. Not overly cold so you avoid going into shock from drastic temperature change, but water just below the "warm" temperature for you. This should help cool your body off while revitalizing you from work or heat. After you do that, then by all means take a steamy bath to relax the muscles in.
If neither of these issues seem to fit, then think about what the purpose of your spell was and see if it could have somehow caused the problems.