A random act of kindness is an unexpected act of charity or helpfulness and is often done for a stranger. The term refers to selfless acts, both large and small, that are committed unexpectedly, without prompting and with no apparent ulterior motive.

GoodTherapy.com

The term random act of kindness is generally attributed to Anne Herbert who wrote, "Practice kindness and senseless acts of beauty" on a restaurant place mat. 

                               GoodTherapy.com