What could cause occasional electrolyte imbalances?

A fellow caregiver asked...

My mother has dementia but has occasional bouts with stroke like symptoms such as her going back 20 or so years, doesn't know where she is at and memory loss. This usually happens every three to four months. We take her to the hospital, it comes on in a matter of hours, and within days she is doing well after her sodium and potassium levels are back to normal. Every time the doctors give us conflicting information. Her body is dehydrated as if not enough fluid is taken in but her system seems to be flushed with excess liquid as indicated by her low potassium and sodium. Is there anything that may be causing the loss of these. We have her drink plenty of fluids daily and eats normally. She is 84 years-old and other than the normal memeory loss seems to be in good health, other than these bouts of extraordinary memory loss. Thanks