When Webmail has worked, do you always "Sign out" when you leave or do you sometimes just close the Webmail browser tab? "Sign out" only ends the current session. It doesn't sign out all previous sessions that accumulate when the Webmail browser tab is closed without a "Sign out". The maximum number of active Webmail sessions may have been exceeded which resulted in the unexpected internal error. It's possible the reason you're sometimes able to sign in later is because another device signed out and dropped you below the maximum active sessions threshold.
If you're able to access Webmail: Settings (gear)> All settings ... > Security > Your devices
Count the number of active sessions listed (for future reference). Then:
Sign out from all devices (will sign out from all but the current session).
Even if you routinely "Sign out", you should do this occasionally to clean up accumulated sessions that will be retained if you happen to close the Webmail browser tab without signing out.
Please post back and indicate if you "Sign out" when leaving Webmail. If you're able to perform the above, please include the number of active sessions listed and your results. This will help give other Webmail users a better understanding, going forward, of the maximum number of active sessions threshold and what may happen if it's exceeded.
If you continue to be unable to sign into Webmail, contact firstname.lastname@example.org. Include your name, the full service address and a link to this thread. Good luck.