Ka'b bin Malik (May Allah be pleased with him) reported: Whenever the Messenger of Allah (PBUH) returned from a journey, he would proceed straight to the mosque and perform two Rak'ah of (optional) prayer.
Commentary
The performance of two Rak'ah of optional prayer is an expression of gratitude to Allah for the safe return. Naturally, one feels happy on such an occasion.