unfortunately that is a sign that your router might be going bad. I had a past router reset itself to factory defaults randomly for a couple months then it finally completely died on me.
You can always try to upgrade your firmware via linksys website or even with a 3rd party firmware like DD-WRT and see if it will save your settings.
You can always try to upgrade your firmware via linksys website or even with a 3rd party firmware like DD-WRT and see if it will save your settings.