The Prophet (may Allah's peace and blessings be upon him) clarified that Tahārah (ritual purity) is one of the conditions for the validity of prayer. Hence, whoever wants to pray must make Wudū’ (ablution) if he has already nullified his Wudū’ by defecating, urinating, sleeping, etc.