I don't remember much from this sci-fi movie...
​
It's a sci-fi movie from the late 70s to early 80s, in color, and the vague bits I remember are:
It was probably set in outer space, someplace other than Earth. A man kept waking up in strange places and began to question his reality. On one of these occasions he woke up covered in some kind of webbing (or net) and seemed distraught as he removed it. Then as he proceeded to explore his surroundings someone or something (vaguely female) crossed the corridor behind where he couldn't see and was gone when he turned around.
On another occasion he was being given electroshock treatment of some kind. I remember someone putting something in his mouth to prevent him biting off his tongue, then someone turned a knob and an oscilloscope went crazy and the man convulsed violently.
Those are the only things I remember from the movie. Hopefully someone can help... Been trying to ID this movie for decades...