Final answer:
The direct speech sentences can be rewritten in reported speech as: 'He told us that he had been having a nightmare,' 'He said that he had had similar nightmares when he was a child,' 'He said that he would take some sleeping pills,' and 'She asked me to pass her the salt.'
Step-by-step explanation:
The sentence "I was having a nightmare," he told us can be rewritten in reported speech as 'He told us that he had been having a nightmare.'
The sentence "I had had similar nightmares as a child," he said can be rewritten as 'He said that he had had similar nightmares when he was a child.'
For the sentence "I’ll take some sleeping pills," he said, the reported speech version would be 'He said that he would take some sleeping pills.'
Finally, "Pass me the salt, please," she asked me is changed to 'She asked me to pass her the salt.'