I routinely do it before. If I have a ling time to sit (> 1hr), I do it afterwards as well.
Happy, at rest,
may all beings be happy at heart.
Whatever beings there may be,
weak or strong, without exception,
seen & unseen,
near & far, born & seeking birth: May all beings be happy at heart.
Let no one deceive another
or despise anyone anywhere,
or through anger or irritation
wish for another to suffer.
— Sn 1.8