You probably know this but, NEVER POINT A LASER AT AN AIRCRAFT, NO MATTER WHAT POWER IT IS.
Now that thats out of the way, you should be fine as long as you turned off the laser as soon as you saw the aircraft and didn't maintain contact with it. 5mw isn't that strong, but to a pilot at night, its still enough to be a distraction, and we don't want someone in a giant plane getting distracted.