Burglars startled a Wiltshire resident in the early hours and threatened him with a hammer.