Here is couple things I do before going to sleep on the boat
I use the GPS by Setting the Anchor alarm to about 200 metres of drift of the spot anchored on (I allowed for tide changes so doesn't go off) I had mates up north have drift very far in one night and woken where the hell are they
I have my anchor light up high so can be seen from all directions and throws light over the whole boat
I anchor up in water where the slient death ( the bigger ships) can't travel or stay out of the shipping lane areas giving them a big wide berth
Set alarm clock(as used to get up to work with for me its my mobile phone) for the time to get up in the morning so not worry about the time too get up
Anchor close by to another boat /group of boats or if couple of boats tie two off toghter
With the water slapping on the boat hull try anchor boat out of swell direction or hide behind an island (is in order and the bilge pumps are working too
should have no trouble getting a good nights sleep on the boat
Mitch
Ps Take your favorite pillow/pillows and bedding make feel more comfortable