I have no doubt that God is absolutely sovereign over his entire universe. We should pray when we have troubles. We know that God can do anything yet at times he doesn't remove the thorn in our flesh. In my case, my first wife died when she was 30 and our two children were both stillborn.
This is indeed sad, I believe it hasn't been easy going through this experience but in all God knows best. I'm sorry for your loss. God works in ways we cannot see and sometimes it very hard to know what He's up to. The only thing we can do is to keep trusting Him even if we going through the worse. I believe He wait till the last minute when we cannot carry on then He steps in so we will understand that He is the God of possibilities and He iscapable of turning things around even at the last minute.