I think you mean "Can you become attracted to the same-sex,if you're away from you opposite long enough"
The answer is a big fat...maybe. It depends on the person. There are instances where men who are together fo years at a time in military units and even societies where men/women spend a lot of time with the same sex... it's been known to spark typical love affairs.
But it has more to do with social hierarchy, how that society views same sex relations and of course huma being human. This is why the Romans,Greeks,Chinese,Japanese ect... didn't have a words like "gay" ,"bi", Straight"....it was all considered level and typical no matter who you sleept with... leading me to conclude that they figured out that sexuality is innate and natural...and was a normal fact of life regardless of who was having relations.