Twice in the past couple days and another time last week, my s4 has just restarted for no reason. I was in the text messaging app both times past two days typing a text when it did it.
Ok, this is probably a long shot, but my Galaxy S4 did restart by itself recently.
I had many (don't remember how many) apps open, the phone hadn't been turned off or restarted in more then 3 weeks and I had pause a video to look for a picture in the gallery when that happened.
I kind of blame it on those factors, like I said, it's maybe a long shot.