Repentance is encouraged in Islam for any shortcomings or sins, including wasting time. The first step is to acknowledge the mistake and sincerely regret the wasted time. Seek forgiveness from Allah through sincere repentance, perform good deeds to make up for lost time, and make a conscious effort to utilize your time wisely moving forward. Allah is forgiving and merciful.