"I did not sleep on the plane."
I can't understand why people give down votes to a question. Is it caused by bug?
This is actually a good question because the meaning cannot be logically deduced and must be learned. When we mention vehicles, 车上、船上、飞机上 all means "in" or "inside" the vehicle. Use 里 is alright but actually less often, and mainly for direct description of the space inside e.g. 车里有股香烟味. If we specifically talk about the compartment or cabin of the vehicle, such as 车厢、船舱、机舱, then 里 is mandatory.
Oh, good question! 我没有在飞机上睡觉 is as viable as 我在飞机上没有睡觉. The position indicates the subtle difference of negation on the whole thing of "Sleeping on the plane", vs. negation on "Sleeping" while you are on the plane.
So your sentence would be more suitable when we want to deny something. e.g. The air-hostess accuses me that I have smoked (抽烟) on the plane, then I would probably say 我没有在飞机上抽烟 (while the other sentence order is also acceptable).
Basically time factor can only be inferred from context. However, 没有 is a negation form for actions assumed to happen, so without any other elements in the sentence saying otherwise, we understand that it is a past action.
It will be helpful to search and know about the difference of 没有 and 不.
I think 没睡觉 is the standard one but would say there is little or no difference to say 没有睡觉. It depends on the regional habit. Both would be quite well accepted.
It is more important to avoid saying 有睡觉 as it only works in certain areas, and may create a bad habit because of it's proximity to "have done something".