Answer
(Fatwa: 193/193/M=1433)
Almighty Allah is the Creator of all actions. The meaning of hadith which you explained is not right. Sneezing and yawning is not the proof of Allah’s pleasure or wrath. Rather good things are attributed towards Allah while bad things towards Satan. Since after sneezing one feels a kind of relaxation and it leads towards Almighty Allah’s obedience; hence it was attributed towards Allah while yawning causes laziness and inattentiveness in worship that pleases Satan; hence it was attributed towards Satan.
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband