On the relaxation of some classes of unbounded integral functionals