Hello thahim. It sounds like an app/widget is freewheeling in the background, draining resources to a critical point.
I'd first clear data and cache on the most likely offending app, then reboot the device. If no joy, uninstall the same app and reboot again for the remedy. No remedy still?
I'd next to a hunt for recently installed apps/widgets and do the same one at a time with one and all.
Factory data reset may be next.