Methyl group attached to a positively charged carbon atom stabilizes the carbocation due to [2024]
(3)
Alkyl groups directly attached to the positively charged carbon stabilise the carbocations due to hyperconjugation effect.
Example: (ethyl cation) in which the positively charged carbon atom has an empty -orbital. One of the C—H bonds of the methyl group can align in the plane of this empty -orbital and the electrons constituting the C—H bond in plane with this -orbital can then be delocalised into the empty -orbital.

This type of overlap stabilises the carbocation because electron density from the adjacent bond helps in dispersing the positive charge.