over the top
This scenario sounds suspiciously like VFR over the top, meaning VMC but no reference to the surface.
This is legal if the plane is instrument equipped. However, if you are a student pilot asking this question then consider FAR 61.89 (a) (7)
"A student pilot may not act as pilot in command of an aircraft ... when the flight cannot be made to reference to the surface."
In that case it would be illegal.