Well, right after? The beanie might soak up some of the min.
Plus, if you move the beanie around on your head, you might get it on other places where you don't necessarily want it... like eye brows.
At the very most, you'd lose some efficiency of the minoxidil, but I imagine it would be negligible.