Scott Tilley pushed the victim onto his bed before stabbing him in the leg with a steak knife during the attack on 5 August 2023.
The victim needed hospital treatment for a wound to his thigh following the incident in Gladstone Street, Mansfield.
Thirty-three-year-old Tilley was quickly identified as a suspect by officers and confirmed as the attacker after analysis of CCTV coverage by detectives.
Tilley, of Gladstone Street, pleaded guilty to committing grievous bodily harm without intent.
He was jailed for 21 months when he appeared at Nottingham Crown Court for sentencing on Friday (5 April).