My daughter has experienced this since age 12. She was diagnosed with Postural Orthostatic Tachycardia Syndrome, (P.O.T.S.)or Inappropriate Sinus Tachycardia (I.S.T.). It is NOT a heart defect, or a heart condition. It is a neurological management problem. Dysautonomia is another possible reason, which my daughter also has.
Here's a "picture" of sorts that one of her doctors gave us to understand what's going on, in kind of analogy. Suppose you have a meal planned. You have all the ingredients in the pantry. It's time to cook. But instead of going to the pantry, you run out and buy all new ingredients, even though the ones in the pantry are identical, and in excellent condition. That would be silly, right? That would be poor management of resources.
Well, when we stand up, or digest food, or move rapidly, our brains sense this and tighten certain valves in certain veins, direct the heart to pump accordingly, and send blood to the right place, like up from our legs to our heads so we don't get dizzy. When people who have P.O.T.S. or I.S.T. stand up, or do something sudden, or turn their head quickly, there is plenty of blood in their veins, their heart and veins work well, (like having all the ingredients in the pantry) but instead of diverting blood from the legs to the head, the brain says "oh, more blood is needed in the head, or in the abdomen" and instead of drawing it up from the legs, it just goes and gets more from the wrong places (like going to the store for all new ingredients when you already had them). As a result, the person feels dizzy, nauseous (sometimes), shaky, and passes out or falls.
The kind of doctor who manages this is called an electrophysiologist. That is a cardiac specialty that deals with heart rates and electrical issues of the heart. A cardiologist usually isn't any help because the heart is normal. It's a management issue.
You can do your own test, which is super simple, but ONLY if you know how to properly take a pulse, with your fingers on the inside of the wrist. Either google it and practice it or ask a friend who's a nurse or trained in taking pulses correctly.
Here's the test. Have your daughter lie down, flat, in a very relaxed setting. Make sure she has not just eaten a large meal. Have her lay on something that she can easily sit up on, like a bed without a railing, or a comfy couch. She will need to be able to sit up and place her feet flat on the floor in step 2 without any inconvenience. Step 1: she lies down quietly for 15 full minutes or even a half hour. Quiet music playing, no tv or heavy metal music, no phones, no interruptions. After ten minutes take her pulse and write it down and do it every 10 minutes for the half hour.
Step 2: Then have her immediately stand up, without using anything for support, and take her pulse. Be prepared - she may get dizzy, so make sure there are people on either side of her. Take her pulse right away and every minute for about 5 minutes. If her heart rate raises more than 30 beats per minute after standing, then P.O.T.S. is a possibility.
It's called a "poor man's tilt table test". You can look it up and read about it. A tilt table test is ordered when P.O.T.S. is suspected, and it involves laying flat on a board that tilts up, recording blood pressure and heart rate and evaluating how the patient feels, and then the board is tilted to simulate standing (but the patient is strapped in securely and being monitored). A specialist needs to order it.
My daughter takes a beta blocker which regulates her heart rate, and she has learned not to do certain things, like jump up from a chair, or get up quickly out of bed, not to eat too large a meal (the brain sends blood to the abdomen while digesting), and not to turn too quickly. For some reason, if she suddenly raises her hand over her head, like to quickly turn on an overhead light switch on a ceiling fan, she'll pass out, so she doesn't do that. Ever.
Anxiety does not cause this or worsen it. There are many reasons why it happens. My daughter had a few serious viruses right in a row that triggered some long-lasting issues. Nothing usually shows up on a blood test. The tilt table test is the only reliable diagnostic tool, but the do-it-yourself test works to show if you should pursue this. Plenty of fluids help, as does eating salty food. Yes, salt helps pool the blood in the veins and helps expand the veins and the blood flows more freely, and most P.O.T.S. patients eat salt tablets, drink salt water, drink water with electrolytes. Salt tablets (Thermotabs is one brand) are available at pharmacies (behind the counter), and online. My daughter didn't like the taste so we fill empty gelatin capsules with unrefined salt and she takes a couple if she feels dizzy. She went through a cardiac rehab program at a major hospital, and all the other patients were quizzed about whether they had controlled their salt intake that day. Not when they came to my daughter. She'd say "I had a hot dog and fries" and the nurses would say "good, you can exercise today" and all the other patients would groan with envy. The other thing that many P.O.T.S. patients do is to consume electrolyte drinks such as marathon runners drink, that contain sodium, potassium and minerals.
Please feel free to message me if you have questions. We've been dealing with this for 10 years now. Oh, Inappropriate Sinus Tachycardia and Postural Orthostatic Tachycardia are basically the same thing, just a different term that different doctors use, and the treatment is basically the same.