It's a sign of affection. He could also be showing his feelings like if he was nervous or worried. This can be seen by his facial expression. But if you two are just relaxing and he rubs your thumb it's a sign of contentment and shows that he is comfortable being with you.