Abstract-The IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) protocol stack is a key part of the Internet of Things (IoT) where the 6LoWPAN motes will account for the majority of the IoT 'things'. In 6LoWPAN networks, heavy network traffic causes congestion which significantly effects the network performance and the quality of service (QoS) metrics. Generally, two main strategies are used to control and alleviate congestion in 6LoWPAN networks: resource control and traffic control. All the existing work of congestion control in 6LoWPAN networks use one of these. In this paper, we propose a novel congestion control algorithm called optimization based hybrid congestion alleviation (OHCA) which combines both strategies into a hybrid solution. OHCA utilizes the positive aspects of each strategy and efficiently uses the network resources. The proposed algorithm uses a multi-attribute optimization methodology called grey relational analysis for resource control by combining three routing metrics (buffer occupancy, expected transmission count and queuing delay) and forwarding packets through noncongested parents. Also, OHCA uses optimization theory and Network Utility Maximization (NUM) framework to achieve traffic control when the non-congested parent is not available where the optimal nodes' sending rate are computed by using Lagrange multipliers and KKT conditions. The proposed algorithm is aware of node priorities and application priorities to support the IoT application requirements where the applications' sending rate allocation is modelled as a constrained optimization problem. OHCA has been tested and evaluated through simulation by using Contiki OS and compared with comparative algorithms. Simulation results show that OHCA improves performance in the presence of congestion by an overall average of 28.36%, 28.02%, 48.07%, 31.97% and 90.35% in terms of throughput, weighted fairness index, end-to-end delay, energy consumption and buffer dropped packets as compared to DCCC6 and QU-RPL.