MI6 spy Gareth Williams tied himself to his bed "to see if he could get free" years before his body was found in a padlocked bag, his inquest heard today.
Mr Williams was working for GCHQ in Cheltenham when his landlord and landlady in the town discovered him with his wrists attached to the head board.
They concluded the act was "more likely to be sexual than escapology," the hearing was told.
In a written statement read to Westminster Coroner's Court, his landlady Jennifer Elliot described the startling scene that confronted her and her husband in the middle of the night three years before their tenant's death.
Ms Elliot, who rented out an annex to her home to Mr Williams, said: "We were in bed and we heard Gareth shouting for help. It was about 1.30am and during winter.
"We both got up, got the spare key and opened the door to the annex.
"I called 'are you ok?' Gareth replied 'can you help me?'
"We went upstairs and found him lying in his bed with both hands tied with material attached at the headboard."
"He was not aroused and I could not see any sperm near him," she went on. "He was very embarrassed.
"He said 'I just wanted to see if I could get myself free'."
Ms Elliot's statement continued: "My husband said 'what the bloody hell are you doing?' and he said 'I just wanted to see if I could get free'.
"We said 'Gareth, we can't have you doing this'. He agreed and said it wouldn't happen again."
There was no repeat of the strange incident, Ms Elliot said, and she and her husband never spoke of it to anyone but each other.
"We obviously discussed it and thought it more likely to be sexual than escapology," she added.