A post-mortem examination was unable to determine their cause of death, but a pathologist said it could have been a result of drowning or pressure to the neck.
Their mother, Sally Stokes, was able to escape the house after being held hostage and stabbed by her husband, the inquest at Loughborough Coroner's Court heard on Monday (local time).
The inquest was told that David had won £40,000 (NZ$80,410) and spent the winnings on a new car and prostitutes.
The pair had been married since 2011, but their relationship had deteriorated — with the couple splitting three months before the incident, but remained on good terms for the sake of their sons.
Hours before the tragedy unfolded, Sally found a secret phone that her husband had hidden in a kitchen cupboard. On it, a notification popped up about a booking he made with an escort.
She also found he had been searching "date rape drugs", which sparked a memory of her feeling "spaced out" the following morning of a Halloween party.
When Sally confronted him that morning, he snapped.
While she was out meeting with relatives to discuss her concerns about David, he killed their two sons.
When she came back to the house later that night, Sally said he hit her with a rolling pin and tried to suffocate her with a pillow.
Recalling the moment before the attack in court, she said her estranged husband calmly asked if she wanted a cup of tea before attacking her as she got changed upstairs.
"I felt him hit me over the back of the head," she said. "I fell on the bed. He put a pillow over my head and tried to suffocate me.
"I wriggled and was screaming for Adam because I thought he was the only person who could help me.
"I ended up by the side of the bed. He was standing there with a rolling pin. He looked evil. I thought at that moment I was going to die."
David lied and told his wife their sons were "safe", but with someone who would harm them if he did not send coded text messages.
He then ordered her to put her engagement and wedding rings back on and tried to force her to put cable ties around her wrists and ankles.
Sally said: "I refused. I went into survival mode. I knew if I did that I was going to die."
At one point, she tried to escape the house by hitting David with the rolling pin before opening a rear patio door — but he slammed her head into a brick wall.
"When I was outside I was screaming, saying his name, I just hoped someone would hear and realise it was us," she said.
"He dragged me back into the house, he was saying 'I can't believe you hit me'.
"He was saying it was all my fault. The fact is he was the one who was sleeping with prostitutes."
Badly injured, Sally managed to escape the house at around 2am through the front door and into the arms of police.
Armed officers then stormed the property and found David dead in his bed. They later found the two boys laying dead in another bed.
Sally spent four days in hospital with head injuries and a stab wound to her back which caused internal bleeding and a punctured lung.
Police told Sally the day after the incident that her two sons and estranged husband had died.
The inquest continues.
WHERE TO GET HELP:
If you are worried about your or someone else's mental health, the best place to get help is your GP or local mental health provider. However, if you or someone else is in danger or endangering others, call police immediately on 111.