Baby sleeping in bassinet


My son is 5 days old and the last couple nights I have let him sleep in bed with my husband and I because he only sleeps for an hour at a time when he’s in his bassinet. Any tips for how to get him to sleep longer in his bassinet? I’m already getting up every 2 hours because I’m breastfeeding but getting up every hour is exhausting. I swaddle him and put a hat on him to ensure he’s warm enough when he’s sleeping in his bassinet.