Media playback is unsupported on your device Media caption Michael Mosley swallows a tiny camera which streams live images of his digestive system

Our own stomachs may be something of a dark mystery to most of us, but new research is revealing the surprising ways in which our guts exert control over our mood and appetite.

Not many of us get the chance to watch our own stomach's digestion in action.

But along with an audience at London's Science Museum, I recently watched live pictures from my own stomach as the porridge I had eaten for breakfast was churned, broken up, exposed to acid and then pushed out into my small intestine as a creamy mush called chyme.

There are over 100 million brain cells in your gut, as many as there are in the head of a cat

I had swallowed a miniature camera in the form of a pill that would spend the day travelling through my digestive system, projecting images onto a giant screen.

Its first stop was my stomach, whose complex work is under the control of what's sometimes called "the little brain", a network of neurons that line your stomach and your gut.

Surprisingly, there are over 100 million of these cells in your gut, as many as there are in the head of a cat.

The little brain does not do a lot of complex thinking but it does get on with the essential daily grind involved in digesting food - lots of mixing, contracting and absorbing, to help break down our food and begin extracting the nutrients and vitamins we need.

Find out more Michael Mosley presents Guts: The Strange and Mysterious World of the Human Stomach on BBC Four at 21:00 BST on Thursday 12 July

Watch online via iPlayer at the above link (UK only)

And all those neurons lining our digestive system allow it to keep in close contact with the brain in your skull, via the vagus nerves, which often influence our emotional state.

For instance when we experience "butterflies in the stomach", this really is the brain in the stomach talking to the brain in your head. As we get nervous or fearful, blood gets diverted from our gut to our muscles and this is the stomach's way of protesting.

Hunger hormones

To accommodate a big meal your stomach has to expand from the size of a fist to around 2 litres. That's a 40-fold increase.

We used to think that stretch receptors in the stomach told the brain when the stomach was full, time to stop eating. But it turns out that the hunger signals produced by your stomach are far more sophisticated than that.

Understanding that has helped doctors treat father of 4, Bob Lakhanpal, who had hardly ever felt full, no matter how much he ate. As a result he had grown to 20 stone.

Six years ago, at the age of 28, he had a heart attack. To help him lose weight, he was recently given gastric bypass operation.

These days I only have to eat a small amount of food and I feel full Bob Lakhanpal, Gastric bypass surgery patient

Now, you might think that just reducing the size of the stomach would be enough to sort out Bob's problems, because the smaller the stomach the less you eat.

But that does not seem to be what happens according to his surgeon, Mr Ahmed Ahmed, at London's Charing Cross Hospital.

"The modern thinking is that by doing the surgery you're producing changes in various hormones, chemical messengers which affect hunger levels and fullness levels, which in turn cause the weight loss.

"Bob's gastric bypass surgery separated off and isolated the part of his stomach which produces most ghrelin, a hormone which appears to play a key role in making you feel hungry." The hope was that this would result in a permanent fall in production of ghrelin.

His new shrunken stomach was then attached further down his small intestine, to a section known as the ileum which secretes a different gut hormone, PYY, which is responsible for making you feel full.

When we eat, it normally takes 20 minutes for food to get from the stomach to the ileum, causing the release of PYY and the message to the brain, "I'm full".

That is why it is better to eat slowly, to give the stomach a chance to tell the brain you have had enough before you overeat.

With his ileum so much nearer his stomach, Bob's brain now gets that message much quicker.

Six weeks after his operation, he had already lost three stone.

"These days I only have to eat a small amount of food and I feel full - I'm happy with that and I can stick with that. Family's happy, I'm happy, can't wait to lose more weight."

Gastric bypass is only available for more extreme cases but there is now intense interest in developing drugs that mimic the actions of PYY.

We think that the brain rules our decision-making process but it's pretty clear from operations like this that our guts have a very profound effect on how we behave.

When you have a big meal, for example, and feel a desire to lie down, that's because about a third of your blood supply is being diverted to your guts to let them do their vital work.

Which is why, as you may have been told as a child, it's best not to do anything too vigorous till your body has had a chance to digest.

Michael Mosley presents Guts: The Strange and Mysterious World of the Human Stomach on BBC Four at 21:00 BST on Thursday 12 July or watch online afterwards via iPlayer at the above link (UK only).