There's physically not enough space in a cockpit for this to be possible, don't worry this is drawn making it look like it's a whole spacious room but it's literally just seats and a fuck ton of control panels in between them and a door to prevent outside disruptions. Some cockpits will have enough room for a seat behind the controls for an extra co-pilot or flight attendant but that's only in very large aircraft and still not enough space to allow for anyone to get freaky.

God please I hope this is just fiction and there's nobody stupid enough in real life to have sex in the cockpit when the plane is high above the ground