I assume its just dreaming? My dog barks and whines in his sleep all the time! And i talk in my sleep ^_^
Although if your ham is making worrying noises at other times of the day I'd check to see if there is anything else
its normal i think, Charlie does and i've actually seen him open his mouth and close it a few times in his sleep, i dont know what he dreams about but i bet its edible!