We study restriction of logarithmic Higgs bundles to the boundary divisor and we con-struct the corresponding nearby-cycles functor in positive characteristic. As applications we prove some strong semipositivity theorems for analogs of complex polarized variations of Hodge struc-tures and their generalizations. This implies, e.g., semipositivity for the relative canonical divisor of a semistable reduction in positive characteristic and it gives some new strong results generalizing semipositivity even for complex varieties.