I have seen a number of mods that overlook this and the bed simply gives the default Rested bonus. It's a fairly simple process but there's a few steps to remember. I haven't seen other tutorials to make this work and figured this out myself by looking at vanilla playerhomes in the game. I'm not entirely sure this is the best method but this is the method I use for this to work.
To make a bed give the well rested bonus:
1. If you have a custom cell for your interior, under World Data -> Location, right click anywhere in the list of locations and select "new." Create a custom location for your cell.
2. Under keywords in the new location, add LocTypePlayerHouse. You can add additional keywords to your cell, but LocTypePlayerHouse is essential. Close the location window.
3. In the cell view window, right click on your cell and select "edit". On the first tab, make sure your cell is set to your custom location. Make sure to click "Okay" and not "cancel." Close the cell window.
4. Load up your cell in the render window. Double click on the bed you want to give the Well Rested bonus. There are a few things we need to do here in order for it to work properly.
5. Under the "Ownership" tab select "PlayerBedOwnership" under Factions.
6. Head on over to the Location Reference Type tab. Select "House Bed Reference Type" in the drop down menu.
7. On the "Scripts" tab, click add. Search for "sleepq" and add the PlayerSleepQuestScript. Click on properties and auto-fill. Click okay to close the window.
Note 1: For some reason, whenever I've done this, even though the message property is filled, the Well Rested message does not appear at the top of the screen, but if you look under active effects in the magic menu, you will see that the well rested bonus has been applied. Done!
Note 2: If you are editing an existing cell within the game, simply add the LocTypePlayerHouse keyword to the existing location data, and follow the steps to set the bed ownership, location reference type and scripts.
Note 3: It is an entirely different process to create a bed for rent in an inn. There are other tutorials out there so I won't go into that here.