If you aren't "keto-adapted," this can happen. When you drop carbs very low, your insulin levels will drop significantly. Higher insulin levels will signal the kidneys to conserve or retain sodium. Conversely, low insulin levels will signal the kidneys to excrete sodium. This signal can be strong enough that potassium will be excreted, too - to keep the Na/K balance. This can be a primary cause of "low carb flu." The standard advice is to supplement sodium, up to 5g/day. Also potassium & magnesium.
I've been keto adapted since Oct 2009. I did experience an afib episode caused by electrolyte imbalance during the adaptation process (knew a lot less about the electrolyte story and low carb diets then). Subsequently, this has not caused me any issues. I routinely fast 5 consecutive days out of 14 (sometimes 7) and eat a 75% fat calorie diet on days I do eat. My insulin can drop to less than 1 on a fast.