My dd did this for about 6 weeks (always when tired or just woken up), it was just a new thing she discovered and she stopped when she moved onto something else. As long as they're not hurting themselves, I think it's just about discovering the things they can do.
My (now) 10month old did this for a while at around 6/7/8 months when falling asleep- especially in his carseat.
He has now invented a game where he shakes his head from side to side accompanied by roaring like a lion and then laughs like a drain. He thinks it's fantastic if somebody joins in copies him and laughs even more. I do think, in his case, it's just about experiencing new senastions andlearningtoberowdy.
You should ask your HV if you're worried though, do you have a drop in clinic you could pop into?