Bam Margera is planning to stay in rehab for longer.

The 'Jackass' star entered a facility in Huntington Beach, California, a fortnight ago following a session with TV doctor Dr. Phil, and he is keen to extend his stay after thanking Warren Boyd, the owner of Wavelengths Recovery Center, for helping him.

He wrote on Instagram: ''I have been in rehab in Huntington Beach for 2 weeks and plan on being here for longer because I love Warren Boyd of Wavelengths and he is helping me.

''You are watching old footage from 2014. I AM SOBER. I HAVE 2 REASONS TO BE SOBER. THEY ARE IMPORTANT TO ME. (sic)''

The 39-year-old stunt performer also took to the photo-sharing site to reveal he had been hospitalised after being struck down with edema, an accumulation of fluid trapped in certain body tissues.

He insisted he was ''fine'' and would be ''out in a few hours'', but later deleted the post.

This comes two weeks after Bam met with Dr. Phil after appealing to him for help shortly after he was kicked off a Southwest Airlines flight for erratic behaviour, and after he slammed his wife Nikki Boyd and his own mother.

He later praised the TV doc as ''the greatest'' following the chat, and admitted he was going to have his ''brain evaluated'' following their discussion.

Bam - who has 20-month-old son Phoenix Wolf with Nikki - wrote on Instagram: ''Dr. Phil is the greatest, he secretly flew out nikki and phoenix wolf, had my mom on standby. Got down to thebroot of the problem and isolated it down with no one interupting eeachother. Pr. Phil ''bambis not crazy, he is extremely frustrated with certain issues, ban is not crazy!''???nope

''Off to dallas to get my brain evaluated! Thanks Dr Phil and michelle 24832199 my phone will be off for a while. Later (sic)''

Bam admitted he tested negative for alcohol and drugs during his meeting with Dr. Phil.

He added: ''By the way i was evaluated and tested for alchol and drugs, the results were negative. Not drunk or drinking, and not on drugs either!! (sic)''