Well, if the phone was OK with a different ROM, that implies your current ROM is the problem - try another one.
I recall having had the same behaviour in the past, when I was trying a lot of ROMs in quick succession - so I don't know which one(s) it was.
All the same, it doesn't sound like hardware/battery. Make a Nandroid backup in recovery, then flash eg PAC ROM or Paranoid Android - wait a day before adding all your apps etc - and see if you get that issue again.
OK, I got some conclusions, and it might be a hardware problem.
First, I replaced the battery with same ROM, it still got SOD.
Then I flash Omni, PAC, Euphoria-OS, all got SOD like before.
So I return to MIUI, no SOD, but I got random reboots and sometimes Wi-Fi will disconnect itself even in its range.
Now I'm using Ivan's AOSP, still got random reboots and Wi-Fi problem.
And now I need this phone to work because I don't have a backup, waiting for new Nexus!!