"Star Trek: Voyager" actor Robert Picardo says he way too old to experiment with Bill Nye the Science Guy ... in the bedroom.
Picardo is asking a judge to stop his soon-to-be ex-wife from spreading rumors he's in a gay relationship with Nye.
The actor says in court docs -- obtained by TMZ -- Linda Pawlik lured him over to her house on July 4th by falsely telling him the family dog was missing. While he was there, he claims Linda had a P.I. attach a GPS device to his car.
Days later ... Linda started telling family friends the P.I. reported back that Picardo and Nye spent 3 hours together in Nye's bedroom, which she believes is proof of an affair.
Picardo says in docs, "I'd made it to 60 without having sex with a man and a 'walk on the wild side' at this age seemed unlikely to anyone who knows me."
The actor acknowledges he and Nye have been friends for years and have taken many pics together ... but he says it's purely platonic.