As noted prayer also is yielding to God's sovereign will. Right now my young nephew has a little boy released from the NICU whose life is still hanging in the balance of uncertainty. The prayer of the parents is that God's will be done. Their faith does not guarantee a miracle but they know it can happen. Whether we have faith in God or not, it will not always change whether or not certain events will transpire. But for those who live by faith .... good can still come out of tragedy.
The death of Christ could be considered a tragedy of death for an innocent man who dared to challenge the religious establishment. But His life and death brought hope to many others who suffer tragedy.
Even tragedy when yielded to sovereignty can have purpose. Tragedy without yielding to sovereignty is tragedy and meaninglessness.