I wasn't even given the option to buy a house. Can I just exit, enter, exit, enter, exit, enter, exit, enter, all in one night?
The option did not appear for me until after I talked to the jarl and let him have his little spiel about the war and that im one step closer to becoming thane.
I had to enter the city and exit at night, but it took me a few tries to figure out the 'correct' way. I had to enter the city from the outside at night and make sure that I fast travelled to a different area like whiterun or something. Basically:
Enter windhelm from the stables at night, fast travel out of the city to white run, teleport back to the windhelm stables at night and re-enter the city. About the 5th time when I went to the graveyard, the guards were there investigating the body. However, this method I used prior to civil war. Once I found out the civil war was the fastest way and I did not have to trigger it like that I havent done it that way since.
If you have completed the full civil war questline and taken over windhelm, and you have spoken with the jarl before the steward and he still doesn't offer the house then you must be bugged. Another possible option is to pickpocket the key from Nilsine and enter the house and activate the quest that way. I have never tried this method but I believe it should activate the same as it would if you walked into the house after you bought it.