'03 E500 turns over but will not start???

Also, the car has just died while driving down the road. After some amount of time, the car will start and run so that I can get where I was going.
Is this possibly a relay issue connected to the security system?
Runs fine otherwise.
Thanks!











