Intermittent faults are the worst to troubleshoot. If you haven't changed anything recently software wise, I can only assume it must be a hardware fault, but exactly what is hard to tell.
Sonic Mania Plus is a great android, this is also a very helpful post. I play this game on my PC in the new version of the Sonic Mania Plus Available to download.